Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: opengl resize format

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2004
    Posts
    21

    opengl resize format

    Hi
    I saw that in every ogl app, when I resize the ogl window on the Y axis, the objects are scaling to fit in the viewport and not to be deformed.
    It acts like a camera back zoom or like an increase of the fov (wich is the Y angle of the field of view)
    But on the X axis, there are not any deformation on the objects, they keep the same size on the viewport.

    Do you have any solution to modify these settings ? For exemple, I would like my object to act the same way on X and Y axis. I don't want any zoom, if I resize my window on Y axis. Is it possible ?

    thx

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: opengl resize format

    Everything is possible.
    The behaviour you described is defined in the program source. If you can have a look at it, you may understand a lot.

    Search for glViewport, glFrustum, and other camera related calls.

    Have a look at the doc :
    http://pyopengl.sourceforge.net/docu...rustum.3G.html

    And this sample :
    http://cvs.sourceforge.net/viewcvs.py/py....viewcvs-markup
    When resizing the window on this sample, the cube is distorted, but exactly the same world space is visible.
    With glFrustum following the rescale in both X an Y, you will get the behaviour you want.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2004
    Posts
    21

    Re: opengl resize format

    ok thx a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •