Results 1 to 2 of 2

Thread: problem in glScaled

  1. #1
    Guest

    problem in glScaled

    Hi
    I have a problem in scaling

    I have an object in 3d space(view using glLookAt)

    I used the following commands for zoom in

    zoom function()
    {
    glScaled(5,5,5);
    glutPostRedisplay();
    }

    There is no "zoom in" effect of the object

    can anybody tell me where I went wrong?

    thanks in advance

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: problem in glScaled

    in your display function, you may reset modelview matrix to identity (glLoadIdentity) before call gluLookAt. so your scale is erased.

    you should do in zoom:
    zoom_enabled = true;

    and in your display function, after gluLookAt:
    if (zoom_enabled) glScale(...)

Similar Threads

  1. Replies: 1
    Last Post: 09-23-2016, 02:24 PM
  2. OpenGL glScaled or glScaledf problem
    By DreamScape in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-24-2014, 04:45 PM
  3. Shading problem? (pyglet-problem?, my problem?)
    By H2OBrain in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-03-2009, 08:31 AM
  4. Replies: 4
    Last Post: 09-27-2004, 06:27 AM
  5. In glScaled() funciton, Z axis does not working
    By Wei in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-05-2002, 09:25 AM

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