Here is some code in C++ that I am trying to port into java.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| void RenderScene(void) { M3DMatrix44f transformationMatrix; static GLfloat yRot = 0.0f; yRot += 0.5f; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m3dRotationMatrix44(transformationMatrix, m3dDegToRad(yRot), 0.0f, 1.0f, 0.0f); transformationMatrix[12] = 0.0f; transformationMatrix[13] = 0.0f; transformationMatrix[14] = -2.5f; DrawTorus(transformationMatrix);
glutSwapBuffers(); }
|
Just an example, I am not sure what m3dRotationMatrix and M3DMatrix44f are. Maybe this will help you figure out what they are for.
I am a OpenGL noobie btw.