PDA

View Full Version : TEXTURES, AND ROTATIONG, TRANSLATION



06-02-2000, 12:37 PM
Hello everyone here is my problem, I created this demo that creates a mirrow effect, with a couple of glutSolidTeapot( ) func, then I rotate, and translate the scene on the X-axis 45 degress like so

void drawGL(void)
{
glLoadIdentity( );
glTranslatef(0.0,0.0, -6.0);
glRotatef(45.0, 1.0, 0.0, 0.0);
drawScene( );
}

ok the above gives a cool effect of the camera on top of ceiling looking down on the scene, now I am trying to do the same thing again I have the exact code but now the rotation screws the entire scene, the only thing different is that I am using a texture to texture map a Quad with a tree, note that drawscene( ) does the pushing and popping of the matrices for each object drawn like so

void drawscene(void)
{
glPushMatrix( );
//draw first teapot
glPopMatrix( );

glPushMatrix( );
//draw mirrow or QUAD
glPopMatrix( );

you get the idea, if you still need more code just ask, I want to have this thing worked out it's beginning to be a pain in the assss. Thanks in advance.

CHEERS...

Kaeto
06-02-2000, 04:31 PM
*mumbles curse*
Something messed up with GLUT. It doesn't like it when you enable texturing.