Results 1 to 2 of 2

Thread: Image Shape and Position

  1. #1
    Member Newbie
    Join Date
    Oct 2003
    Posts
    32

    Image Shape and Position

    When i attempt to resize the window the shape of the image is changed. How to solve this one? Means always the image size and position is same when i resizing the window.

    [This message has been edited by ramana (edited 10-18-2003).]

  2. #2
    Guest

    Re: Image Shape and Position

    You need to adjust your viewing transformation whenever you resize the window.

    You don't say what windowing system interface or viewing transformation you're using. In GLUT with a perspective view you'd put glutReshapeFunc(reshape) in your init to register the reshape() method as the resize callback, then define reshape as something like:

    Code :
    void reshape(int w, int h)
    {
         glMatrixMode(GL_PROJECTION);
         glLoadIdentity();
         gluPerspective(45.0, (double)w/(double)h, 0.1, 100.0);
         glMatrixMode(GL_MODELVIEW);
    }

Similar Threads

  1. Translating Position A in relation to position B
    By imported_paul_g_griffiths in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-02-2017, 04:25 AM
  2. Does the image always form at the eye position?
    By Lee_Jennifer_82 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-21-2015, 12:24 PM
  3. Applying 2 image textures to simple shape object?
    By mobileopengl in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 09-23-2015, 11:44 AM
  4. Replies: 1
    Last Post: 07-24-2014, 04:59 PM
  5. Replies: 2
    Last Post: 10-16-2012, 11:23 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