Jump to content
  • Advertisement
Sign in to follow this  
Seabolt

OpenGL Quick question about glGetIntegerv

This topic is 2122 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!