Jump to content
  • Advertisement
Sign in to follow this  
noodleBowl

OpenGL SDL2 vs SDL2/OpenGL

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

Hey everyone, I've kind of come to a dilemma and I was wondering if I could get some opinions weighed in

 

I started to look at SDL 2.0 today. Ran through some Lazy Foo tutorials and could not help feel like I should just learn go ahead and start learning openGL again. Coming from learning openGL and directX on and off in the past, it feels wrong when I see some of the SDL API calls. I mean am just blowing things out of proportion?

 

I know SDL does a lot of other things like mouse and keyboard, but strictly looking at graphics is pure no openGL SDL enough?

 

The game I would like to develop would only be 2D, have particle effects, 2D lighting, 2D water, and maybe a few other things along those lines

 

What are your guy's thoughts?

 

 

Share this post


Link to post
Share on other sites
Advertisement

Have you considered SFML?

 

If you want to use OpenGL, you can use SFML for window management and events, and use OpenGL for drawing. SFML uses OpenGL for it's own drawing, so it's hardware accelerated, if you wish to use SFML directly without OpenGL.

Share this post


Link to post
Share on other sites

If you want particles and lighting you will need to get closer to the metal and use OpenGL... I use SDL2 and OpenGL in a few of my projects, and it's really no different from using native win32 API and OpenGL, or glut and OpenGL.. At the end of the day, you're going to have code for handling the window and input, and then code using OpenGL. It's nothing to stress about.

 

I like to compartmentalize my API usage confining each API to an individual source file, and abstract its usage. I have a render.c which handle ALL opengl stuff, no other parts of my code (text, models, scene, etc) use any OpenGL functions, only render.c functions..

 

I put all my SDL2 code in a system.c file, so that no other source file must call any SDL functions, only system.c functions..

Share this post


Link to post
Share on other sites

Plain old SDL is basically for making Mario Brothers clones. If you want to do anything more advanced than that, you will need to use OpenGL.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!