PDA

View Full Version : OpenGL, SDL


benguru
2003.11.24, 08:52 PM
Hello,
I will be starting to learn Cocoa soon, I was wondering if I were to want to use graphics in programs should I learn SDL or OpenGL or both. Also is SDL made from OpenGL. I am very confused. I hope you can help. Thanks.
-Ben

hokan
2003.11.24, 11:09 PM
SDL basically does what OpenGL doesn't, OpenGL only figures out how to put 3D into a OpenGL context, i.e. it's useful to set up your OpenGL context (window/fullscreen, bit depth, resolution).

SDL does also allow you to handle keyboard, mouse, sound and many other things in a platform neutral / portable manner, so it's easy to recompile for windows and linux.

Skorche
2003.11.25, 02:09 AM
Depends, what do you want to do with it? If you're looking to make 2D games with quasi hardware acceleration, use SDL. It's far simpler to learn and set up.

If you want to do 3D or well optimized 2D with openGL, I would recommend learning GLUT. It's also cross-platform, handles mouse and keyboard input, and seems better documented.

Mars_999
2003.11.25, 02:03 PM
I recommend you learn OpenGL and use that for Gfx and not use SDL for Gfx. OpenGL is easy to use for 2D as SDL. And when you or if you need to use 3D you will be able to apply that knowledge you already learned in OpenGL to use on the 3D portion. SDL is great. If you just want to make games and not bother with Cocoa and Carbon or ObjC. Use SDL it wil make your life easier. Right now for some reason SDL doesn't work with Xcode from what I have tried. I downloaded it and installed it. I don't have the framework available to use in Xcode. Either Xcode or 10.3 messed it up.

codemattic
2003.11.26, 04:09 AM
dont forget allegro <http://alleg.sourceforge.net/> !