Jump to content
  • Advertisement
Sign in to follow this  
decoder55

OpenGL How to display sprites in a opengl game

This topic is 1796 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 everyone, i'm new in game developing. Recently i programmed my first game, a pong game. I used c++ with opengl. The game works very well, but now i want to improve my desing. I don' t know what is de common way to do this, but the general idea is change the quads i've made with opengl (for the ball and the rackets) by 2D sprites i designed.

 

I don't know if this kind of things can be done with opengl. I need specific libraries or toolkits? And one more question, can i make a GUI with sprites as buttons?

 

Thanks a lot! biggrin.png

Share this post


Link to post
Share on other sites
Advertisement

sprites are nothing more than a quad with a textured drawn on top of it.  By using the alpha channel in your texture you can make objects looks like spheres or characters even though the underlining geometry is still two triangles.

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!