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…
“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.
thank you but i have no idea for codes. do you have an example?
none. but google has plenty.
any link? i couldnt find any document about it