Jump to content
  • Advertisement
Sign in to follow this  
efestream

about drawing spheres

This topic is 3447 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 am starter for opengl. i have a project.. its name is balls pyramid. http://www.3dpuzzles.nl/puzzles/ballspyramid/bollenpiramide.gif here is the pieces of my puzzle. how can i draw this 5 pieces? i dont have any idea. pieces must be movable with direction keys.. thanks..

Share this post


Link to post
Share on other sites
Advertisement
Well, you have 3 options.

1)You can use that gif as a sprite sheet, if you remove the letters, make the background alpha transparent, and move the F piece a little to the right. The idea is to draw rectangled quads, and texture map them to rectangles in your sprite sheet that represents the piece you want to draw.

2)The same as 1, only you have only one ball on your texture, and you draw it several time to represent different pieces. you can have a vector that stores the offset of each ball in the piece.

3)The same as 2, except you use gluDisk to draw your spheres. Don't forget to call "glDisable(GL_TEXTURE_2D);".

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!