Jump to content
  • Advertisement
Sign in to follow this  
Yamian

OpenGL in SDL

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

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!