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

Thread: Is PatchParameter a link-time attribute of the GL program?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jul 2010
    Posts
    123

    Is PatchParameter a link-time attribute of the GL program?

    Hi,

    Do I have to call PatchParameter only once at link time when creating the program, or do I have to call setPatchParameter every time I actually use the program (after glUseProgram)?

    I have two different programs and it seems the PatchParameter state is not restored when glUseProgram is called - is this expected?

    Thanks,
    Fred

  2. #2
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    304
    The patch parameters are part of the global GL state, and not part of the shader program. That is likely why you need to set them when you switch programs, if the programs have different patch settings.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Jul 2010
    Posts
    123
    Thanks. I'm confused sometimes as to what belongs to the program, to the global state, what I need to rebind and so on. Still looking for a neat PDF diagram that would tell me everything

  4. #4
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    304
    The OpenGL specifications have a section on "state tables" which you can use to figure out where various states live. It's section 6.2 in the GL specs 4.2 and lower, and Chapter 23 in the GL 4.3 spec.

Posting Permissions

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