| |||||||||||
|
Main Menu Other |
Tutorials -- glFeedbackBuffer | ||||||||||
|
What is glFeedbackBuffer?For quite some time I had no idea what glFeedbackBuffer was, or even that it existed. I discovered it one day and found how incredibly useful it is. The FeedbackBuffer lets you get feedback from OpenGL (yeah, go figure?). What does this mean? Say you want to know the exact screen coordinates of where something will be rendered in your 3d world. There's no accurate way to calculate this, because the player could be anywhere in the game and see it from any angle. But thanks to FeedbackBuffer we can find out with no calculations at all. What it does is it tells OpenGL to *not* render something to the screen. Instead, it "pretends" to render it, meaning it calculates where it will be on screen, because OGL has to know where to draw each pixel, and then gives us feedback on where it was placed. This can also be used to figure out what color something was rendered at, even after light calculations were made. Neat, huh? This tutorial won't cover getting colors like I just mentioned, but maybe I'll do one if you request it enough. Hint hint. Click next and we'll get started.
|
|||||||||||