Program Freezes with Double Buffering
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
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.
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.
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?
I'm using dev-C++ with Windows Vista and a NVIDIA GeForce Go7300. Anyone hear about possible compatibility issues with Vista?
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.
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.
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
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
Seems like that was the problem. I don't know what I could do about that though apart from switching to a different compiler (which I did).
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement