Results 1 to 4 of 4

Thread: glEnableVertexAttribArrayARB: global or per program?

  1. #1
    Junior Member Newbie
    Join Date
    May 2006
    Posts
    17

    glEnableVertexAttribArrayARB: global or per program?

    Hi all! I'm trying to build a small class to wrap vertex and fragment objects, but I have a question for you: are the following functions:
    glEnableVertexAttribArrayARB
    glDisableVertexAttribArrayARB
    glVertexAttribPointerARB
    globally defined or only respect to the currently active program?
    That is, if I enable a vertex attrib array and then I bind another shader, is the vertex array still enabled or do I have to enable it again for the new shader?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: glEnableVertexAttribArrayARB: global or per program?

    These functions effect global states and not states of the current bound vertex shader or vertex program.
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Redlands, CA, USA
    Posts
    233

    Re: glEnableVertexAttribArrayARB: global or per program?


  4. #4
    Junior Member Newbie
    Join Date
    May 2006
    Posts
    17

    Re: glEnableVertexAttribArrayARB: global or per program?

    Thank you!

Similar Threads

  1. Replies: 1
    Last Post: 03-28-2018, 09:34 PM
  2. Why different behavior using global vs global const
    By opengl_er in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-22-2018, 06:07 AM
  3. Replies: 1
    Last Post: 10-12-2016, 03:14 PM
  4. Any global barrier?
    By Tim82 in forum OpenCL
    Replies: 2
    Last Post: 12-20-2011, 02:01 AM
  5. glTexEnvi global?
    By Jeffg in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-29-2010, 04:47 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
  •  
Proudly hosted by Digital Ocean