Sign in to follow this  

Program Freezes with Double Buffering

This topic is 3568 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 hope this is the right forum for this type of question. Here's my problem: when I use the SwapBuffers() function, my program completely stops responding the moment I press any key on the keyboard, even though I'm not doing any keyboard input handling of any kind yet. If I use glFinish() instead of SwapBuffers() and remove the PFD_DOUBLEBUFFER flag then it works fine, but I'll want double buffering when I start animating. Can anyone think of what might be causing this problem? If there is a specific section of my code that would be helpful for me to post here just let me know. thanks, jjoelson

Share this post


Link to post
Share on other sites
You should use glFlush when you use single buffering.

I don't know what your code looks like so the best advice I can give is to try other peoples code, like nehe.gamedev.net
If those demoes don't work, then we know your computer has a problem. Maybe you will need to update drivers then.

Share this post


Link to post
Share on other sites
Good call, I tried out the nehe lesson one code and had the exact same problem. But unfortunately I have absolutely no idea about where I might start in trying to fix this problem.

I'm using dev-C++ with Windows Vista and a NVIDIA GeForce Go7300. Anyone hear about possible compatibility issues with Vista?

Share this post


Link to post
Share on other sites
There are a lot of compatibility issues with Vista and I'm not just talking about GL. Actually, it's not always Vista's fault but I don't want to get into that.

Start by calling glGetString(GL_VENDOR), GL_RENDERER, GL_VERSION.
VENDOR should be nVidia
RENDERER should be your video card
VERSION should be 2.1
Then see if you can get new drivers from whoever makes your laptop.

I am running Vista with a Gf 8600 laptop. It's ok.

Share this post


Link to post
Share on other sites
Well I tried the program in Visual C++ 2008 and the problem disappeared. I guess it was something to do with the compiler?

It seems to work fine in this IDE, so I really don't need to find out exactly what the problem was.

Thanks for the help,
jjoelson

Share this post


Link to post
Share on other sites
Of late, I've had lots of broken pointers and undefined behaviour which can only be attributed to bad compiling, change of compiler to a Visual C++ one is generally the solution or a industrial compiler such as the Intel one.

Share this post


Link to post
Share on other sites

This topic is 3568 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.

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