Sign in to follow this  
crocomire

viewport background color

Recommended Posts

Ali_B    223
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
Brother Bob    10344
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

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