Transformfeedback??

Hi

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
  4. glBeginTransformFeedback()
  5. gl drawarrays
  6. queryobject

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?

Thanks

You may use glEnable/glDisable(GL_RASTERIZER_DISCARD) to avoid drawing.
7) glEndTransformFeedback :slight_smile:
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 -

GLfloat data;
data = (GLfloat
) glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER,GL_READ_ONLY);
tdkPrintf(“data=====%d,%d,%d”,data[0],data[1],data[2]);

I am getting very strange results like -
data=====1073741824,-1077528042,-2147483648

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.

Thanks.