OpenGL in SDL

Started by
4 comments, last by Rebooted 19 years, 7 months ago
Would learning OpenGL alone hurt me when trying to learn SDL OpenGL stuff. Is OpenGL the same either way or is it dif when done through SDL?
Advertisement
OpenGL is the same either way.

Some books etc, give you the win32 setup code - which is extensive and un-useful. SDL lets you avoid all of that, and in a few lines of code set up an OpenGL rendering context.

Once you have a rendering context, it doesn't make any difference how you obtained it, the commands for actually doing the rendering are the same.

Mark
so it just requires a bit of different setup but the rest of the code is exactly the same? therefore an OpenGL book would be good? good
What I did was get a basic file structure built in SDL then used the NeHe tuts. It was a little work but that is one way to learn. Yes an opengl book is good either way you go.

Steven Bradley .:Personal Journal:. .:WEBPLATES:. .:CGP Beginners Group:. "Time is our most precious resource yet it is the resource we most often waste." ~ Dr. R.M. Powell
You could probably follow along with the book if you skip its initialization code. Though it can be tiring and complicated, I'd suggest using a book's OpenGL initialization code rather than writing your own if you're new to OpenGL. That way, you can follow along with the entire book and avoid obscure bugs that might come up.
Go to Nehe and download the base code. You can get a version that uses WGL (the windows-specific method of setting up GL) and a version the uses SDL. Look at how the setup code differs. The actual calls to OpenGL are the same.

This topic is closed to new replies.

Advertisement