glClear ...part of the screen
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!
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?
Does that make sense any? or am I confused?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement