Jump to content
  • Advertisement
Sign in to follow this  
jeff2050

OpenGL How to implement a 2D game using OpenGL

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

Hi, I just start to learn OpenGL. A question is that how I can implement a 2D game using OpenGL. Where can I get something on this topic? A lot of thanks if you can give me a pointer.

Share this post


Link to post
Share on other sites
Advertisement
OpenGL doesn't have a "2D" mode or anything (nor does D3D). Most people fake 2D in OpenGL or D3D by simply constraining all their rendering to a fixed Z plane (or set of planes) and/or using an orthographic projection instead of a perspective projection, so objects do not diminish in size with distance.

Share this post


Link to post
Share on other sites
If you've just started, I think you're better of using SDL for your first 2D games.
And then when you get the hang of it, use OpenGL as your graphics engine, but keep SDL for input handling etc.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!