Sign in to follow this  
Followers 0
Seabolt

OpenGL
Quick question about glGetIntegerv

3 posts in this topic

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?

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0