Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ichor

glClear ...part of the screen

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

Hello! I have an issue with a split screen program I''m making. What happens: Currently, the render code does this (some steps left out: For TOP PART of screen 1. Declare viewport 2. glClear 3. Render scene For BOTTOM PART of screen 1. Declare viewport 2. glClear 3. Render scene The problem I''m having is a terrible flickering, which is being caused by the glClear''s. If I remove the glClear from the BOTTOM render piece, the top one stops flickering...and vice versa. However, I cannot do a glClear before both parts of the screen because the BOTTOM portion doesn''t get drawn fast enough between the clear, render of TOP, and drawing of itself...it gets a flicker (though less pronounced than using 2 glClear()''s. Question: What''s the best way to get around this? I *have* to have the glClear before rendering, but basically what I need to do is clear PART of the screen at a time. Is this possible? If I could clear the top, render, clear the bottom, render, I think it''d work. Any ideas? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
You''re not doing two separate draw/buffer-flips are you? I''m having trouble understanding how the bottom portion is flickering (due to not drawing "fast enough" like you said). If you clear the screen, set a viewport, draw the top, set another viewport, draw the bottom, then flip, it should work perfectly. When the flip occurs, you get both the top and bottom displaying at once.

Does that make sense any? or am I confused?

Share this post


Link to post
Share on other sites
Wow, actually, that''s exactly what I was doing...two buffer swaps. Damn, you think I would''ve realized and seen something like that. Works great now. Thanks!

Share this post


Link to post
Share on other sites

  • 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!