| |||||||||||
|
Main Menu Other |
Tutorials -- glFeedbackBuffer | ||||||||||
|
The Source CodeOk, lets get to it. First we have to make a variable through which OpenGL returns our information.
Second step is to tell OpenGL how we want to use the FeedbackBuffer. We have to do this before we set our RenderMode to FeedbackBuffer, otherwise we get an error. Use this line of code to do it: glFeedbackBuffer(4, GL_3D, (float *)buf); What do these parameters do?
Now lets turn on Feedback: glRenderMode(GL_FEEDBACK); Now we can do stuff to get feedback. A good way to do this is to simply render a point at the spot we want to test.
Finally, lets turn off Feedback and set our RenderMode back to GL_RENDER: glRenderMode(GL_RENDER); Move on to see how to use this feedback.
|
|||||||||||