From: Nicolas Charpentier <ncharpentier@fr...> - 2004-05-31 17:13:03
I'm new to pyOpengl and OpenContext. I'm trying to build an orthogonal
view. Without OpenContext, I can use glOrtho() to build the view but how
can I do with OpenContext.
by advance, thanks for your help.
From: Mike C. Fletcher <mcfletch@ro...> - 2004-05-31 17:36:05
OpenGLContext really wasn't designed for use with Orthographic views (it
wasn't designed to exclude them, but it has no explicit support for
them). The relevant places to stick your fingers would likely be the
viewplatform and the viewplatformmixin modules. The ViewPlatformMixin
class is a mix-in to have the context delegate viewpoint and
projection-matrix setup to a ViewPlatform object. The default
ViewPlatform object is pretty simple to follow, you'll likely want to
sub-class it, change the navigation mechanisms and then use the
appropriate glOrtho instead of gluPerspective call in the render method.
If you're just trying to do this for a simple demo/test, however (i.e.
you don't want keyboard navigation in your ortho view), you may find
overriding the whole of the Viewpoint method on your Context serves your
needs (the mix-in class just overrides this and delegates to the platform).
Nicolas Charpentier wrote:
> I'm new to pyOpengl and OpenContext. I'm trying to build an orthogonal
> view. Without OpenContext, I can use glOrtho() to build the view but
> how can I do with OpenContext.
> by advance, thanks for your help.
> Nicolas Charpentier
Mike C. Fletcher
Designer, VR Plumber, Coder