Main - Overview - Documentation - FAQ - Media


Environments are objects that define specific OpenGL settings such as the projection matrix and are also given a chance to draw in the framebuffer before anything else for purposes of creating a specific feel to the environment.  Like most of the public classes provided by Vision the Environment class is meant to be subclassed and have its messages overridden.  Its main main messages are outlined below:

- (void) BoundsChange This message is sent if the bounds of the viewport change.  The Environment object might want to modify its aspect ratio or alter other data accordingly.
- (void) Clear This message is sent every frame before any drawing occurs and by default simply clears the current framebuffer.
- (void) Projection This message is also sent every frame before drawing occurs but after the - (void) Clear message and lets the Environment object have the opportunity set up the projection matrix.
- (void) Camera This message is also sent every frame after the Projection message and allows for any initial translations, rotations, scalings etc that are to be performed on the modelview matrix.
- (void) InverseCamera This message does the same thing as Camera except in the inverse.
- (void) Draw Called every frame after Camera to give the Environment object first dibs on drawing that frame so as to set an initial feel or environment (things like drawing a skybox or background picture).

Copyright © 2004-2011 Aoren LLC All rights reserved.
[email protected]