[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OpenGL vs. SDL for 2D
Mark Collins wrote:
> On Wednesday 27 February 2002 11:27 am, Vesselin Peev wrote:
> > That's the last piece of the puzzle, and I think I made a decision already!
> > So why use SDL (without the OpenGL wrapping part) from now on then? It
> > would die out relatively quickly if this is the situation.
> OpenGL is a 3D API, where as SDL is more of a complete multimedia API,
> offering better sound, input and, uh, file loading support than OpenGL. On
> Linux, I tend to use both SDL and OpenGL for these very reasons.
Yes - it's not an either/or decision. SDL provides the necessary framework
that OpenGL needs to do things like open a window, provide a rendering context
and read the mouse/keyboard/joystick.
GLUT can do that too - so GLUT and SDL are mutually exclusive but OpenGL
works with either.
Using OpenGL by itself isn't an option - it's not designed to do anything
except the actual job of drawing things.
> Of course, there is GLUT, but I don't like that very much.
There isn't a whole lot to like or dislike. Most GLUT programs have six lines
of initialisation to open a window and register some callbacks - and then your
routines are just magically called whenever something important happens.
GLUT is *very* simple.
> SDL also makes OpenGL initializtion so much simpler (against some other APIs,
> like Xlib *shudder*).
Well, yes - almost anything is better than raw X.
----------------------------- Steve Baker -------------------------------
Mail : <email@example.com> WorkMail: <firstname.lastname@example.org>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net