Jump to content
  • Advertisement
Sign in to follow this  
Shum

OpenGL buffer swapping takes REALLY long time

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

Hello friendly people! I'm making a simple 2d game with SDL and OpenGL and am having a weird problem. The game compiles and runs good on my newer beefier linux computer but when I try to compile and run it on my windows computer it runs really really chunky. I've narrowed it down to the call to SDL_GL_SwapBuffers(). with the following code: int debug = SDL_GetTicks(); SDL_GL_SwapBuffers(); cout << "swap took: " << (SDL_GL_GetTicks() - debug) << endl; I get an output like: swap took: 1034 swap took: 1206 swap took: 1000 swap took: 1087 swap took: 1256 swap took: 1099 etc. So my buffer swaps are taking about a second each! Any ideas why this would be? OpenGL is installed properly as far as I know, I can play Quake 3 without any lag. Any help with this would be hugely appreciated.

Share this post


Link to post
Share on other sites
Advertisement
glGetString(GL_RENDERER)? glGetString(GL_VERSION)? glGetString(GL_VENDOR)?

Share this post


Link to post
Share on other sites
I doubt it is VSync, the numbers are too inconsistent and I have yet to see a monitor with a 1000Hz refresh rate. Show us the rest of your code good sir, perhaps we could point you in the right direction then. I have used SDL with OpenGL plenty of times and never had this problem.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!