Quote:
Originally Posted by ekuaL
Do i have lost in performance programming with sdl instead of glx and x11? How "much" do i lose?
|
You know, you could simply compile and test the application instead of asking.
Anyway... unless your application should be able to render pictures at 5000 frames per second, I wouldn't worry much about performance - that, in my opinion, is a premature optimization.
The point of SDL (and other toolkits) is that you get one program version to babysit instead of several. I cannot give you glx vs SDL comparison, but SDL speed is comparable with what you can get by using WinAPI + OpenGL + DirectInput (for keyboard/mouse) on windows platform. Disable vsync, and achieving few hundreds frames per second won't be a problem. There may be few percents difference, though, but it'll be hard to notice.
In my opinion, you should not worry about performance (unless you have some really heavy graphic-related stuff) until you run into problem, and you should not worry about providing several platform-dependent versions to manage OpenGL, until you have to do that - that'll be premature optimization. Make your app, test it, and once it is working as expected, you can start finetuning. Even with SDL, you may run into some compiler-related cross-platform quirks (non standard functions like vsprintf can be implemented differently, non-standard sprintf parameters can behave differently, and so on), so you'll have things to do before optimizing.