Sign in to follow this  
Seabolt

glClear with glFlush

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

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