Modify Program 4.4 so that the sun, planet, and moon are textured. You may continue to use

Question:

Modify Program 4.4 so that the “sun,” “planet,” and “moon” are textured. You may continue to use the shapes already present, and you may use any texture you like. This will require you to build texture coordinates for the cube.

Program 4.4private Matrix4fStack mvStack = new Matrix4fStack(5); public void display(GLAutoDrawable drawable) { // setupgl.glDrawArrays(GL_TRIANGLES, 0, 18); mvStack.popMatrix(); ||------- cube == planet // draw the sun // remove} //-- smaller cube == moon mvStack.pushMatrix(); mvStack.translate(0.0f, (float)Math.sin(tf)* 2.0f,

Step by Step Answer:

Related Book For  book-img-for-question

Computer Graphics Programming In OpenGL With JAVA

ISBN: 9781683922193

2nd Edition

Authors: V. Scott Gordon PhD, John L. Clevenger PhD

Question Posted: