Low FPS using SDL open gl compared to Opengl Glaux

Started by
3 comments, last by Kwizatz 15 years, 10 months ago
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
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.
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?
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]
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.

This topic is closed to new replies.

Advertisement