-
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
-
Super Moderator
OpenGL Lord
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.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules