/* attempt to deal with prototype, bootstrap, jquery conflicts */ /* for dropdown menus */

Jump to content

Image of the Day

What's the best way to move your heavy stuff? Using a power loader! #spacr #screenshotsaturday 💪🤖💪 https://t.co/sOjz2XNVeq
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Quick question about glGetIntegerv

4: Adsense

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   

781
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

#2 Seabolt   Members   

781
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   

10211
Like
2Likes
Like

Posted 23 September 2013 - 01:10 PM

No, the default destination blend factor is GL_ZERO.



#4 Seabolt   Members   

781
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.