Jump to content

  • Log In with Google      Sign In   
  • Create Account

Quick question about glGetIntegerv


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 23 September 2013 - 01:02 PM

Hey guys,

 

I'm currently working on implementing a render state caching system for our OpenGL build. I'm using this block of code here:

GLint oldDest = GL_ONE_MINUS_SRC_ALPHA;
glGetIntegerv( GL_BLEND_DST, &oldDest );

to try and get the previous destination blend factor. But when the function returns, oldDest is 0. Now from what I've read, it shouldn't change the value of oldDest if it fails, and I'm not getting any error codes from glGetIntegerv, but 0 is not a valid destination blend factor.

 

Do you guys have any idea what may be causing this?


Perception is when one imagination clashes with another

Sponsor:

#2 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 23 September 2013 - 01:06 PM

Well 0 is a valid destination blend factor, my mistake was elsewhere. But I am curious why it would return 0 instead of GL_ONE_MINUS_SRC_ALPHA which should be the default.


Perception is when one imagination clashes with another

#3 Brother Bob   Moderators   -  Reputation: 8194

Like
2Likes
Like

Posted 23 September 2013 - 01:10 PM

No, the default destination blend factor is GL_ZERO.



#4 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 23 September 2013 - 01:15 PM

Oh damnit, you're right, that's what I get for reading too fast. Sorry, Brother Bob. Thanks for the help!


Perception is when one imagination clashes with another




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS