OpenGL Vs SDL

Started by
31 comments, last by sdlprorammer 19 years, 11 months ago
1)Which one is better, and which one is harder to learn? 2)I ''ve heard that OpenGL is for 3D graphics, and SDL for 2D. But this doesn''t make too much sense too me.. What does OpenGl support that SDL doesn''t? 3D graphics aren''t just many 2D shapes? Then how is it possible that SDL doesn''t support 3D graphics? It''s all about painting in the screen, isn''t it? thanks in advance
Advertisement
Use both.
it;s difficult to learn both. Can you give me a more precise answer and more to-the-point...
3d graphics deal in 3d space, 2d graphics deal in 2d space.
... ??? ...
There is no ''better'', they both do a different job.

SDL is a platform independant library consiting of various routines to make it possible to make game without worrying about the OS under it, with things like networking, window creation and such like.

OpenGL on the other hand is a 3D Graphics API, designed to allow people to create 3D graphics via a standard interface.

Now, you can use SDL to create a window and then have OpenGL drawing to it, which is how many people use it.
You can ofcourse do it without using OpenGL, however iirc it wont be as fast as its not using hardware accelertion to perform operations.

SDL does support 3D via OpenGL to use hardware accerlated functions, however yes you could probably write a 3D engine without OpenGL in SDL, just dont expect it to go very fast, thats all as it will all be software driven.

Really, you should go read up on what SDL and OpenGL do properly, thats just really a quick overview of how it works.
thanks for the help
so after i have a decent understanding on SDL ( just decent ), i could go to the "opengGL part" of SDL and learn how to use 3D graphics, whithout neccesarily understanding all about OpenGL? I mean, i could easily learn only that part of OpenGl for 3d graphics and be able to use it behinh SDL?
thanks...
SDL does a lot for you, but you''ll still have to learn OpenGl for programming 3d games.

When you use SDL as OpenGl framework then most of what you know about creating 2D applications will be irrelevant.
There are better toolkits for setting up / working with OpenGl IMO.

Maybe you should read existing threads and articles to get an idea of what the difference between 2d applications and 3d applications is ...
Writing errors since 10/25/2003 2:25:56 AM
quote:Original post by sdlprorammer
thanks for the help
so after i have a decent understanding on SDL ( just decent ), i could go to the "opengGL part" of SDL and learn how to use 3D graphics, whithout neccesarily understanding all about OpenGL? I mean, i could easily learn only that part of OpenGl for 3d graphics and be able to use it behinh SDL?
thanks...

Yes.
ok thanks So i am going to learn more about SDl, and after i feel comfortable with it, i''ll learn a little OpenGl for making 3D graphics ..
thanks for all the help !

This topic is closed to new replies.

Advertisement