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 1 of 1

Thread: glVertexAttribPointer call is messing up texture render

  1. #1
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    1

    [SOLVED] glVertexAttribPointer call is messing up texture render

    The calls are using attribute locations from a different shader than the one that draws the texture, but the attributes are attached to the same VAO (still not sure why this is affecting the texture). Lines 192 and 195 (in this gist) will mess up the texture, making it a solid color. I honestly have no clue how they are causing this. Does anyone have a clue what's going wrong?

    FIXED: I assumed that vertex attributes were guaranteed unique indices, but they are not. Defining attribute indices explicitly with layout(location = x) fixed it.
    Last edited by bonsairobo; 07-05-2013 at 10:57 PM.

Posting Permissions

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