Results 1 to 2 of 2

Thread: resizeGL()

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default resizeGL()

    Hi, myWidgetGl has resizeGL() but when I resize width window, in my scene Perspective seems don't take action; it works if I resize the hieght of window. Why this?

    Qt Code:
    1. void MyWidget::resizeGL(int width,int height) {
    2. printf("resizeGL...\n");
    3. glMatrixMode (GL_PROJECTION);
    4. glLoadIdentity ();
    5. //cout << width << height << endl;
    6. GLdouble ratio=((GLdouble)width/(GLdouble)height);
    7. gluPerspective(45,ratio,3,40);
    8. glViewport (0, 0, (GLdouble) width, (GLdouble) height);
    9. glMatrixMode (GL_MODELVIEW);
    10. glLoadIdentity ();
    11. }
    To copy to clipboard, switch view to plain text mode 
    Regards

  2. #2
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Re: resizeGL()

    Any hints about this?
    Thanks
    Regards

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.