Swapbuffers is breaking my program

  I've been using OpenGL for a little over a year now and never had this problem before.  I just built a computer for the first time and I'm trying to program OpenGL on it but I think I'm missing something.  Everytime I call SwapBuffers, the program crashes.  

  I'm running on Vista 64 bit using Visual Studio 2008.  I have opengl32.lib, glu32.lib, gl.h and glu.h referenced (correctly?) in my project.  I'm currently trying to use wxWidgets but I don't think that's the problem.  I installed glut, and tried to run one of my previous programs but it was also breaking on the swapbuffers call.  I don't think it's a problem with my code, I think I either didn't build a library, or forgot to include something somewhere along the line. 

   If somebody could narrow my problem down, that'd be great.  Let me konw if any other info would help.

Which graphics card you have and did you install proper graphics card driver?

I have an ASUS EAH3650 TOP. I installed the drivers that came with the card, and when I used Windows to update the driver. It said I have the latest driver. The box says it has OpenGL 2.0 support.

and when I used Windows to update the driver

Do not do this.
instead go to ATI/AMD website; search for latest stable driver for an ATI Radeon HD 3650 on Vista 64.

wxWidgets has its own SwapBuffers() function to call on the GLCanvas class. You should be using that instead of calling SwapBuffers() directly. You don’t say whether you are doing this already, so it’s something to consider.

(You also don’t mention the version of wxWidgets you are using. What I said is true for version 2.4.x … I can’t guarantee it’s still true for the latest 2.8.x versions)

I am using wxWidgets 2.8.7. I’m calling SwapBuffers inside the class GLCanvas which derives from the wxGLCanvas class. The GLCanvas is part of my main window. So should I have the mainwindow call swapbuffers on the canvas because I wanted the GLCanvas class to call swapbuffers within its own drawing routines. I’ve tried running some of the provided demos too and those don’t work either.

Also I went ahead and found the latest driver for my card. I don’t think it fixed the problem.

I found the problem. When I turn my second graphics card off, then my program works, and swap buffers performs correctly. So the problem should have something to do with the CrossfireX or how I connected the two cards or something. Thanks for all the help anyway.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.