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).
HTH,
Mike
Nicolas Charpentier wrote:
> Hi,
> 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
http://members.rogers.com/mcfletch/
blog: http://zope.vex.net/~mcfletch/plumbing/
|