Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


What is SDL?

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

I know what is OpenGL (Open Graphic Libaries), but i dunno what is SDL????? And where can i find information regrading SDL? and 1 more thing..... How do other people can build a game engine that can run on both DirectX and OpenGL????

Share this post

Link to post
Share on other sites
SDL (Simple DirectMedia Layer) is just a cross platform abstraction layer or

SDL is a free cross-platform multi-media development API

Read more at their home page: http://www.libsdl.org

With regards to the development of multi graphic/platform targets, its actually quite simple, at least in principle. Everything that relates to graphics are placed in 3 classes a abc (Abstract Base Class) class you could call CGraphic, which holds the methods you want to use. This could be a DrawTriangle method which is abstract, then you create a new class called CGraphicOpenGL and one called CGraphicDirectX which both inherits the CGraphic class. Now these classes must define this method, and you simply write the code used in OpenGL or DirectX in order to draw a triangel.

Then in your main program you do something like this:
main ()
CGraphic* pGraphic;

if (Settings->isOpenGl())
pGraphic = new CGraphicOpenGL;
pGraphic = new CGraphicDirectX;


delete pGraphics;

And thats all there is to it. You can do this for every aspect of the engine, for example file access is different on Unix and Windows and you then just write 2 different classes both inheriting from the same abstract parent class.

Hope this helps, else have a look at the articles I'm pritty sure that there is an article on that.

-- Sturm

Edited by - Sturm on November 14, 2001 12:46:31 PM

Edited by - Sturm on November 14, 2001 12:48:01 PM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!