Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Transformfeedback??

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2010
    Posts
    3

    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

  2. #2
    Intern Contributor
    Join Date
    Nov 2009
    Location
    Ukraine
    Posts
    79

    Re: Transformfeedback??

    You may use glEnable/glDisable(GL_RASTERIZER_DISCARD) to avoid drawing.
    7) glEndTransformFeedback
    Check XBO buffer for desirable data.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2010
    Posts
    3

    Re: Transformfeedback??

    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_O NLY);
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •