![]() GlRotatef(rtri,0.0f,1.0f,0.0f) // Rotate The Pyramid On It's Y Axis GlTranslatef(-1.5f,0.0f,-6.0f) // Move Left And Into The Screen GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) // Clear The Screen And The Depth Buffer int DrawGLScene(GLvoid) // Here's Where We Do All The Drawing We'll blend the colors on the pyramid, creating a smoothly colored object, and for the square we'll color each face a different color. By doing this, we turn the triangle into a pyramid, and the square into a cube. We will do this by adding a left, back, and right side to the triangle, and a left, right, back, top and bottom to the square. Expanding on the last tutorial, we'll now make the object into TRUE 3D object, rather than 2D objects in a 3D world.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |