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 10 of 11

Thread: Transform Feedback

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    13

    Transform Feedback

    Hi,

    I am trying to use Transform Feedback with GL_VERSION (3.2.0 NVIDIA 195.36.31). When Im trying to load function pointer for example:
    Code :
    glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC) glXGetProcAddress ((const GLubyte*)"glGenTransformFeedbacks");
    I have a 0 pointer in glGenTransformFeedbacks variable.
    What Im doing wrong, or what I forgot to do?

  2. #2
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    315
    For transform feedback objects, you either need OpenGL 4.0 or GL_ARB_transform_feedback2 support. Driver 195.36.31 is a very old driver that only supports GL3.2 and it predates the transform feedback object specification. Try updating your driver to a more recent version, like the 306 series.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    13
    Okay, another question.
    How can I find out, is my GTS 250 support this feature or not?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Only NVIDIA's DX11-class hardware supports ARB_transform_feedback2, so you can't use feedback objects. You can test these sorts of things by using the OpenGL extensions viewer.

  5. #5
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    315
    Well, you can install a newer driver and check for the extension, or your can use a utility like the GL extensions viewer ( http://www.realtech-vr.com/glview/download.php) and check your card in the database (spoiler: I checked for the GTS250 and GL_ARB_transform_feedback2 is not there).

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    13
    Thanks, Im install new driver and it works, as I can see. But now I have another question.
    Ho to devide the output stream from my shader to multiple buffers. I want the transform feedback feature to write vec3 vVerteces variables to one VBO and vec3 vNormals variables to another.

    I tried to unite my two VBOs in this form: [vertex normal vertex normal ....] but
    Code :
    glVertexPointer (3,GL_FLOAT,3*sizeof(GLfloat),0);
    glDrawArrays(GL_LINE_STRIP, 0,(m_Dimension + 1)*(m_Dimension - 1)*2);
    use normals as verteces too. Is this code wrong, or I don't understand what do 3rd param of glVertexPointer, or I make nistake in other place?

  7. #7
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,190
    Quote Originally Posted by ein_shved View Post
    Thanks, Im install new driver and it works, as I can see. But now I have another question.
    Ho to devide the output stream from my shader to multiple buffers. I want the transform feedback feature to write vec3 vVerteces variables to one VBO and vec3 vNormals variables to another.

    I tried to unite my two VBOs in this form: [vertex normal vertex normal ....] but ... use normals as verteces too. Is this code wrong, or I don't understand what do 3rd param of glVertexPointer...
    Yeah, the 3rd parameter (stride) is for exactly this case. It tells the driver/GPU how much to skip to get to the next vertex. If you provide 0, it assumes there isn't anything else in between values for this vertex attribute, and they're tightly packed one right after another.

    If you're writing vec3 positions and vec3 normals, change it to 6*sizeof(GLfloat).

Posting Permissions

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