• Advertisement
Sign in to follow this  

glClear with glFlush

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

I recently started playing around with OpenGL because I got a job where we use OpenGL almost exclusively. I have a DirectX background and I love rendering, so I figured I might as well see how OpenGL works too. I have set up a little test app where I'm just trying to clear the screen. Now I can set up my HDC and HGLRC with no problems, and SwapBuffers no problem with no errors being thrown, but it when I call clear, the game slows down immensely, to the point where it takes 10 - 45 seconds for a close to register. I fixed this issue with a glFlush() call, but I read that glFlush() can cause a number of issues and shouldn't be used really. My question is then, why did glFlush make glClear work?

Share this post


Link to post
Share on other sites
Advertisement
Never heard that glFlush "can cause a number of issues". What do you mean?

BTW: Please stop to ask the same question in multiple forums at the same time. I've given a possible explanation in one of your other threads already.

Share this post


Link to post
Share on other sites
I've been reading that glFlush can cause a lot of issues especially in the area of multi-threading and cause huge slowdowns on some cards, so I'm trying to avoid it.

And yes you have and I thank you for responding to both. I'm only trying to get my question out to as many people as possible because even though you look through both forums, doesn't mean that someone else who has an idea does :)

Though I responded on the other post and we can continue there if you will.

Share this post


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

  • Advertisement