| |||||||||||
|
Main Menu Other |
Tutorials -- glFeedbackBuffer | ||||||||||
|
How to use glFeedbackBuffer's FeedbackAfter we render anything while in GL_FEEDBACK, our variable
The Z value represents how OpenGL does Z Buffer, or Depth Testing. Since glFeedbackBuffer pretends to render things to the screen, we can see how Depth Testing actually works. What it does is, each time anything is rendered to the screen, OpenGL stores it's Depth value (between 0 and 1) and keeps track of it. Next time it has to render something to that pixel, it checks if the new pixel to be rendered has a different Z value. If the new value is greater (farther away) than the stored pixel value, it won't render the pixel. Otherwise, it renders it and stores the new value in the Depth Buffer. That's it for this tutorial. Click here to return to the tutorials index.
|
|||||||||||