Results 1 to 2 of 2

Thread: TEXTURES, AND ROTATIONG, TRANSLATION

  1. #1
    Guest

    TEXTURES, AND ROTATIONG, TRANSLATION

    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...

  2. #2
    Member Contributor
    Join Date
    May 2000
    Posts
    72

    Re: TEXTURES, AND ROTATIONG, TRANSLATION

    *mumbles curse*
    Something messed up with GLUT. It doesn't like it when you enable texturing.

Similar Threads

  1. Translation
    By sisolina_23 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-21-2012, 03:26 PM
  2. 3D Cube rotationg unexpectedly on touch
    By innova in forum OpenGL ES
    Replies: 1
    Last Post: 09-08-2010, 12:42 AM
  3. Doing your own translation
    By howie in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-12-2004, 01:29 PM
  4. translation
    By dlswimmer in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-11-2003, 10:33 AM
  5. translation
    By lee in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 08-23-2000, 09:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean