I’m rendering my scene to a texture that I then want to project to a flat plane. I’m thinking I want to draw a plane at the water level to the 2 side and back and front of the frustum. Is this how I should do this?
Next comes the actual projecting part. I was doing it like :
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glPushMatrix();
glTranslatef(0.5, 0.5, 0.0);
glScalef(0.05, 0.05, 1.0);
gluLookAt(nCamera.pos.x, nCamera.pos.y, nCamera.pos.z, nCamera.view.x, -3, nCamera.view.z,
nCamera.up.x, nCamera.up.y, nCamera.up.z);
glMatrixMode(GL_MODELVIEW);
But I am not sure how to adjust the scale so it using gluLookAt() so the texture is fits perfect.
I found an old Yann post with this, but when I did that the entire plane was colored a solid color.
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glPushMatrix();
glScalef(0.5f, 0.5f, 1.0f);
glTranslatef(1.0f, 1.0f, 0.0f);
glMultMatrixf(camPointer->projMatrix);
glMultMatrixf(camPointer->modelMatrix);
// OK, the matrix is set, get back to modelview
glMatrixMode(GL_MODELVIEW);
Any help is greatly appreciated.
[Edited by - skow on August 27, 2004 7:49:52 PM]