Quick question about glGetIntegerv

Started by
2 comments, last by Seabolt 10 years, 7 months ago

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
Advertisement

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

No, the default destination blend factor is GL_ZERO.

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

This topic is closed to new replies.

Advertisement