I got a problem with my skybox program.
I have made a skybox and a platform in it.
I want to move around the platform while the skybox is in my viewvolume. I use gluLookAt to move the camera.
But my problem is i want to roate the platform and skybox in the same time. But i want to move using the up and down arrow key along the platform. While moving forward and backward…the skybox should be in the fixed place. so the sky box shud only hae the effect of rotation not the forward backeard movement. How can i implement that. I uses the Digiben camera class for this program.
A typical scene graph (“rendering engine”) will set up the modelview transform for each object it renders. It will do this by multiplying the object’s transform (position and orientation) with the inverse of the cameras transform (position and orientation), convert that to a matrix, and load that matrix into modelview.
When you draw the sky box, your scene graph (“rendering engine”) should just take into account the inverse of the camera’s orientation, and nothing else. As you typically draw the sky box instead of calling glClear on the color buffer, this typically falls outside the main traversal of the scene graph, and thus it should be simple to replace:
glClear( GL_COLOR_BUFFER_BIT );
Mat44 m; (-camOri_).toMat44(&m);
glLoadMatrix( &m.e00 );
mySkyBox_->drawOn( this );