Jump to content
  • Advertisement
Sign in to follow this  
Ripter001

OpenGL Why use OpenGL for 2d games?

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

I was wondering if there where any good reasons for using OpenGL to make a 2d game? I've found information on HOW to use OpenGL, but not WHY. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
You get 'free' blending, scaling, rotating, multiresolution support, etc... The list of advantages is almost endless.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tjaalie
So you can make use of hardware acceleration?


If they'd hurry up and make OGL the f***ing backend (like DDraw 5 is) for SDL we wouldn't have these problems.


[sad] I wish I was a far better programmer [headshake]

Share this post


Link to post
Share on other sites
primarily speed, even on a cheap graphics card with no attempt at gl specific optimization you can get at least twice the performance that you'd get with software drawing

Quote:
Original post by Alpha_ProgDes
If they'd hurry up and make OGL the f***ing backend (like DDraw 5 is) for SDL we wouldn't have these problems.


last time i checked SDL had some basic opengl support, from there its easy to write a basic wrapper to convert SDL surface to opengl textures and draw 2d quads

Share this post


Link to post
Share on other sites
The current rev of SDL in SVN has an OpenGL backend, I believe.

Back to the OP's question: Another neat thing you can get by using OpenGL is pixel shaders. Now you can do per-pixel effects like in the olden DOS days, except way, way, way faster and in parallel. Doing things like per-pixel lighting and self-shadowing of sprites would be completely unheard of back then.

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!