Jump to content
  • Advertisement
Sign in to follow this  
crocomire

viewport background color

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

Advertisement
glClearColor (r1, g1, b1, a1);
...
glViewport (x1, y1, w1, h1);
...
glClearColor (r2, g2, b2, a2);
...
glViewport (x2, y2, w2, h2);

Share this post


Link to post
Share on other sites
glScissor will restrict the area cleared. Since the viewport does not prevent fragments from being generated outside the viewport, I advice you to keep the viewport and the scissor box in sync, unless you have a good reason not to, of course. That way, you will never touch anything outside the viewport, and that includes glClear.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!