class opengl.GLPerspective(GLViewport)GLPerspective provides an OpenGL drawing area with a perspective projection.
Using a GLPerspective widget is the same as using a GLViewport, except that you do not need to provide a setup_projection() method.
- GLPerspective(rect = None, fovy = 20, near = 0.1, far = 1000)
- Creates a GLPerspective instance with the given initial values for its projection parameters.
- fovy, near, far
- The projection parameters, as used by gluPerspective().
You can change these to dynamically modify the projection. The aspect
ratio is calculated automatically from the widget dimensions.