Jump to content
  • Advertisement
Sign in to follow this  
5quirrel

Low FPS using SDL open gl compared to Opengl Glaux

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

Hi all, I have tried compiling some codes off NeHe and found that say for tutorial 9, I get 10 frames per sec on the SDL version while 300 frames with the one compiled using glaux. Is it a problem with my computer or is SDL opengl that slow? I have tried other tutorials and is getting the same results. Some one pls help! T.T Com specs: T8300 2.1ghx core 2 duo, 3MB RAM, geforce 9500M GS, Windows XP

Share this post


Link to post
Share on other sites
Advertisement
Nothing about the SDL/OpenGL combination is naturally slow. Perhaps your code is just inefficient. I don't see why your computer would have trouble with it either, so that's probably not the issue.

Share this post


Link to post
Share on other sites
both codes are obtained from NeHe directly. It isnt my code.

Only change i did was changing from include <gl\gl.h> to <sdl\sdl_opengl.h>

Is this the souce of the problem?

Someone help! What should i provide here so that i can get more assistance?

Share this post


Link to post
Share on other sites
Even though you say the code is from NeHe, post it here (between [ source][ /source] tags). I never thought NeHe was the best site for tutorials, though it is good information in general and there have been wonderful efforts recently to update the site, so maybe the code isn't exactly optimal. In the meantime, I'll try it myself and see what I get.

EDIT: OK, I compiled lesson 9 myself using Linux/SDL source code, and I get about 1000 frames per second with Vsync off. 54 frames per second with it enabled. I don't see any reason why you would get a low frame rate...

[Edited by - bschneid on July 16, 2008 11:47:39 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by 5quirrel
both codes are obtained from NeHe directly. It isnt my code.

Only change i did was changing from include <gl\gl.h> to <sdl\sdl_opengl.h>

Is this the souce of the problem?

Someone help! What should i provide here so that i can get more assistance?


So... does that mean you didn't change the WinApi OpenGL Window initialization routine to SDL's?

If all you really did was to switch that header, you're not really using SDL.

Also remember to enable double buffer with SDL_GL_SetAttribute before the call to SDL_SetVideoMode.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!