Sign in to follow this  
NeXius

How slow is SDL for 3d apps?

Recommended Posts

NeXius    124
Hi I've started writing an engine using SDL but I'm getting bad frame rates. I don't want to jump to conclusions about SDL but I've heard that it may not be the best choice... Is something like Allegro better/faster? Any help appreciated

Share this post


Link to post
Share on other sites
Drew_Benton    1861
Well you cannot use SDL in itself for 3D. It is a 2D library with additioanl featues. However, you can use OpenGL through the SDL library, which only gives you advantages. Take a look at the link in my profile, "SDL vs GLFW" for some additional knowledge. After you read that, if you choose to, you will see how great SDL can be for 3D games [smile]. I am between using SDL or GLFW right now for our game. It's going to be an advanced 3D one as well. Take a look at this thread as well. Hope this helps.

- Drew

PS Allegro is the same. You will have to get AllegroGL to get 3D functionality. I'd say go w/ SDL or something like GLFW, but that's my opinion on the matter. Some like Allegro a lot, but I do not know...So to answer your question, if you use the right features, SDL is not slow at all for 3D [wink].

Share this post


Link to post
Share on other sites
Aldacron    4544
Quote:
Original post by neXius
Hi

I've started writing an engine using SDL but I'm getting bad frame rates. I don't want to jump to conclusions about SDL but I've heard that it may not be the best choice... Is something like Allegro better/faster?

Any help appreciated


When using SDL, AllegroGL, or GLFW together with OpenGL, the only thing they do is set up the rendering context and provide a platform independent interface to system and input events. This has no bearing on your OpenGL calls, and if there were any glaring bugs in any of those libraries that interfered with the framerate of a game they were most likely found and squashed long ago. Look elsewhere for your frame rate problem.

Share this post


Link to post
Share on other sites
Daivuk    413
Or you can make it like a everyone else, and like john carmack ;)
Create your ogl window (depending on the os), get your input to work by yourseft (depending on the os) and do all the stuff by yourseft. Stuff like SDL, Glut, are stuff used in university (its like that in montreal) to LEARN 3d without botter with input and context (probably its your case?). But thats not really professional and you are limited to your SDL API for input, window control, etc...

Me:
I'm using Win32 API for creating my context
Win32 API for mouse input, keyboard input, joystick input
FMod for 3D sound rendering
OpenGL for graphic API
and using winsock2 for network programming.

With that, you have better control on everything, and probably you have more chance to become a "core coder".

Thats my opinion :P

(but these are not really portable to mac or linux.. exept for fmod)
SDL is portable.
And unreal tournament 2004 is using SDL, so, in conclusion, its not a bad thing.


(sorry for my english, from montreal, "the city on game programming :)")

Share this post


Link to post
Share on other sites
darookie    1441
Quote:
Original post by Daivuk
Me:
I'm using Win32 API for creating my context
Win32 API for mouse input, keyboard input, joystick input
FMod for 3D sound rendering
OpenGL for graphic API
and using winsock2 for network programming.

With that, you have better control on everything, and probably you have more chance to become a "core coder".

Me:
I'm using a customised Ogre3D build for rendering, window creation and input processing.
My own cross-platform sound library.
Some cross-platform lib for networking.

Does that imply you > me?
My opinion: Why care about window and context creation if it just boils down to coding the n*Π variant of basically the same code. This has little to do with control or efficiency - it's only a huge waste of time.

Just my .02€
Pat.

Share this post


Link to post
Share on other sites
bkt    178
I'm thinking of trying to get Ogre3D working in my engine; right now I just have the SDL loading up a window. I've been working on some other little things for my engine in the meantime (currently finishing up a filesystem) and I hope to start looking into a 3D API soon. I'm probably going to stick with (at first) a 2D RPG though; something similar to the original Final Fantasy games. I'm wondering if SDL would probably be better for me.

Share this post


Link to post
Share on other sites
NeXius    124
Ahhh ok

The fact that a professional game like UT 2004 is using it is pretty reassuring.
I was worried that it was akin to glut ( ie. used in uni type stuff but nothing really professional )

Thanks for clearing that up

Share this post


Link to post
Share on other sites
Drew_Benton    1861
Quote:
Original post by neXius
Ahhh ok

The fact that a professional game like UT 2004 is using it is pretty reassuring.
I was worried that it was akin to glut ( ie. used in uni type stuff but nothing really professional )

Thanks for clearing that up


Well just to clarify, they use SDL on non-Win32 systems, but none the less, it still is a great sign [smile]. Here's my reference. Good luck with your project!

- Drew

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Quote:
Original post by Daivuk
Or you can make it like a everyone else, and like john carmack ;)
Create your ogl window (depending on the os), get your input to work by yourseft (depending on the os) and do all the stuff by yourseft. Stuff like SDL, Glut, are stuff used in university (its like that in montreal) to LEARN 3d without botter with input and context (probably its your case?). But thats not really professional and you are limited to your SDL API for input, window control, etc...

Me:
I'm using Win32 API for creating my context
Win32 API for mouse input, keyboard input, joystick input
FMod for 3D sound rendering
OpenGL for graphic API
and using winsock2 for network programming.

With that, you have better control on everything, and probably you have more chance to become a "core coder".

Thats my opinion :P

(but these are not really portable to mac or linux.. exept for fmod)
SDL is portable.
And unreal tournament 2004 is using SDL, so, in conclusion, its not a bad thing.


(sorry for my english, from montreal, "the city on game programming :)")


How are you a 'core coder' if you use opengl? Why not code your own renderer and sound systems etc... ? If you like reinventing the wheel fine, and if you like to fiddle around with the winapi and tell people your leet fine. Meanwhile we'll all use all the helper libs we can and leave you in the dust ;P

SDL was created to port Quake to Linux. It's been a commercial level product since day one.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this