• Advertisement
Sign in to follow this  

get current clear colour?

This topic is 3593 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

Is there a way to get the current clear colour? or to change it clear then return to the original as in pushing and popping a clear colour? cheers! A

Share this post


Link to post
Share on other sites
Advertisement
You can push and pop it using PushAttrib/PopAttrib with the COLOR_BUFFER_BIT flag. You can get the color using GetFloatv with the COLOR_CLEAR_VALUE flag.

Share this post


Link to post
Share on other sites
You should keep a global struct in which important state data is maintained.
You can then access this global struct from anywhere. This is much better than constantly querying gl for state changes every five minutes.

Share this post


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

  • Advertisement