View Full Version : about drawing spheres
01-09-2009, 07:41 AM
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..
01-09-2009, 08:04 AM
"how can i draw this 5 pieces?"
build one instance of the sphere (vertex -index buffers) and render them with different transformation matrix (MODELVIEW). rotation is not important only the translation counts here (glTranslate). with this you displace the spheres where you want them. same with direction keys which is not an OpenGL issue. grab pressed keys in your application and adjust the values in glTranslate. you can use GLUT to draw spheres.
01-09-2009, 09:35 AM
:) thank you but i have no idea for codes. do you have an example?
01-09-2009, 10:44 AM
none. but google has plenty.
01-10-2009, 02:55 PM
any link? i couldnt find any document about it
01-10-2009, 03:49 PM
Come on ...
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.