Whether to learn SDL
I have a quick question for you guys-
I have been programming in C++ for about 2 years now (just finished up AP Comp Sci in HS) and I would like to start making some graphical games.
Now my question is would it be worth my time to start out with SDL? Right before school was out my teacher pointed SDL out to us so thats how I found out about it. Or would my time be better spent going right into Direct X/OpenGL?
Any insight would be greatly appreciated!
(don''t worry if you guys talk me into going the direct x/opengl route I will decide which one to use myself as not to start a flame war )
SDL is an open source abstraction layer for games. It pretty much encapsulates OpenGL/Direct X and gives the user the ability to use the SDL functions to preform API specific tasks. However, this is how a good game engine is normally designed. So the question becomes do you want another layer of code between your game engine, and the API.
IMHO SDL is fine if you just want to start playing with things and find current API''s a little to complex to understand. However when you want to use new features in API''s that have just been released (I.E. when OpenGL 2.0 or DX 9 come out) your going to have to wait for someone to update SDL and preform all the testing to verify that the code is stable enough to use. This could take a few months to a year. And I don''t consider it very wise to be reliant on someone elses code.
IMHO SDL is fine if you just want to start playing with things and find current API''s a little to complex to understand. However when you want to use new features in API''s that have just been released (I.E. when OpenGL 2.0 or DX 9 come out) your going to have to wait for someone to update SDL and preform all the testing to verify that the code is stable enough to use. This could take a few months to a year. And I don''t consider it very wise to be reliant on someone elses code.
Here''s my two cents on SDL. Since I use Linux for development it is easiest to use something like SDL for the windowing and some of it''s other features for control but for sound I use OpenAL, and for my actual graphics I use OpenGL. AFAIK SDL does not interfere with APIs such as OpenGL and/or DirectX. It just creates the surface for them to draw on. Therefore when OpenGL 2.0 or DX9 do come out it doesn''t matter what version of SDL you are using. My personal opinion is to use SDL for the features you want and use other APIs for what else you want. For my projects I have not had any trouble with the various versions of SDL mixed with OpenGL or OpenAL.
quote:Original post by renuncln
AFAIK SDL does not interfere with APIs such as OpenGL and/or DirectX. It just creates the surface for them to draw on. Therefore when OpenGL 2.0 or DX9 do come out it doesn''t matter what version of SDL you are using.
Your some what correct. However when new features are added to an API, SDL will not be automatically able to use them. The authors (or who ever is maintaining the code) will have to go in and add support for something like the High level pixel shader language which is going to be integrated into OGL 2.0. And it will need to expand it''s functionality to encapsulate the new features of DirectX 9 also. This will not be done when the API''s are released, it will take time for the maintainers of the code to write and test this new functionality. This is the point I was getting at.
I think that you are misunderstanding what SDL does when you use OpenGL with it. All that SDL does is create a surface for OpenGL to render on. I could just as easily do this with about 3 pages of code in X11lib but why bother when SDL will do the same thing for me. You still use OpenGL independently from SDL. I can not say if the same is true for DirectX or not since I am not a windows programmer. What will be doing the shader language etc... is the OpenGL drivers supplied by the video card maker. The same as how that same driver is responsible for whatever implementation of OpenGL is currently used.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement