OpenGL Super Bible! Page 377 // Save the (Anonymous web server)
OpenGL Super Bible! Page 377 // Save the matrix state and do the rotations glMatrixMode(GL_MODELVIEW); // Rotate and translate, then render the bolt head glPushMatrix(); glRotatef(xRot, 1.0f, 0.0f, 0.0f); glRotatef(yRot, 0.0f, 1.0f, 0.0f); glTranslatef(0.0f, 0.0f, 55.0f); RenderHead(); glPopMatrix(); // Save matrix state, rotate, translate and draw the // shaft and thread together glPushMatrix(); glRotatef(xRot, 1.0f, 0.0f, 0.0f); glRotatef(yRot, 0.0f, 1.0f, 0.0f); glTranslatef(0.0f, 0.0f, 40.0f); // Render just the hexagonal head of the nut RenderShaft(); RenderThread(); glPopMatrix(); // Flush drawing commands glFlush(); Figure 10-8 Output from the BOLT program
In case you need quality webspace to host and run your web applications, try our personal web hosting services.