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: Do glGet__() functions always modify their argument even on error?

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    5

    Do glGet__() functions always modify their argument even on error?

    Do glGet___() functions always modify the output variable, even on errors?

    Examples:
    glGetVertexAttrib, glGetInteger, glGetProgram, glGetVertexAttrib, glGetBufferParameter, etc.

    Yes, this is an extremely minor optimization that is fairly unsafe and probably shouldn't be done. Since this question is implementation dependent, I'm looking at OpenGL 3.x and 4.x.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Yes, this is an extremely minor optimization that is fairly unsafe and probably shouldn't be done.
    ... What is a "minor optimization"? What are you "optimizing"? And most important of all, if even you believe that it "probably shouldn't be done"... why are you doing it? Whatever it is that you're doing.

    Since this question is implementation dependent
    You asked a question that you already knew the answer to (though technically, the answer is that it is undefined in most cases, not implementation dependent). So... what exactly do you want to know? The answer is what you said: there is no answer.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    5
    Answered my own question:

    glGetQueryObject
    If an error is generated, no change is made to the contents of params.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    ... how does that answer your question? That answers it for one function, but not for all of the ones you asked about.

Posting Permissions

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