I am using OpenGL version 3.0 and I want to test the transformfeedback feature.
I've write a app and doing it by
1) calling glTransformFeedback varyings() before vertex shader linking.
2) Binding trasform feedback buffer
3) calling beginquery with GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
5) gl drawarrays
At the end query object is returning a 0 primitives written.
If I query with the PRIMITIVE_GENERATED than it is giving me proper value but not sure why it is not retuning any primitive to TRANSFORM_FEEDBACK_BUFFER?
Moreover, I am able to see the display on screen. So data is in a framebuffer.
Could anyone tell me, how to get transform feedback buffer?
You may use glEnable/glDisable(GL_RASTERIZER_DISCARD) to avoid drawing.
Check XBO buffer for desirable data.
Thanks a lot for reply....
But could you also tell me how I can check the XBO data?
I am doing by -
data = (GLfloat*) glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER,GL_READ_O NLY);
I am getting very strange results like -
I am using the same example which is shown in a OpenGL red book on page - 724.
Could you please help me in reading the varying variables again.