Mostly this library is here only as a convenient placeholder. More...
|base floating point color object More...|
|If a client wants to use this library's glut helper entry point, it needs to supply an object that supports this interface. More...|
|Create one of these (you'll have to inherit) if you have openGL work you need to submit to requestTask(). More...|
|A Material is anything that needs to be set up prior to drawing, and possibly requiring some cleanup afterwards. More...|
|Cameras and OpenGL|
Basically, use GL_PROJECTION to set up the camera properties but NOT position or rotation.
|Wavepacket OpenGL Threading|
|OpenGL Effects Library|
Several useful OpenGL effects.
|void||glut::start (int argc,const char *argv,int width,int height,const char *title,const char *gameModeString,smart_ptr< Host > &host)|
|clients can call this to get common glut setup |
|typedef rect2d_t< int >||glut::recti_t|
|void||glut::getViewFrustum (const camera_t &camera,const Viewer &viewer,frustum_t &viewFrustum) throw ()|
|This is a method to determine the view frustum given the current camera settings and viewer orientation. |
|void||glut::drawFrustumEdges (const frustum_t &f,const glut_color_t &color) throw ()|
|helper method to draw the edges of a frustum |
|void||glut::push2D (int screenWidth,int screenHeight)|
|switches to 2D drawing. |
|restores 3D drawing (make sure to call this after calling push2D()!). |
|void||glut::drawCursor (int x, int y)|
|int||glut::createTextureFromImage (const media::image_t &image)|
Mostly this library is here only as a convenient placeholder.
Code with glut dependencies can refer to this module in the build, and then the right directories will be searched for include files, the right libraries linked, etc.
This library does provide a few helper objects and methods to make using glut easier, and to abstract away common setup code.
|void glut::getViewFrustum||(||const camera_t &||camera,|
|const Viewer &||viewer,|
This is a method to determine the view frustum given the current camera settings and viewer orientation.
What is a frustum? It is a basic 3D solid. See http://en.wikipedia.org/wiki/Frustum In particular, this is a clipped 4-sided pyramid, also called a right square frustum. In 3D rendering, a frustum defines the area of space that can be seen from the current camera, given its position and orientation. This is called the view frustrum. Given other objects, we can quickly test if they are inside the view frustrum or not. If not, we can avoid rendering them altogether. This is called culling. If you have partitioned your object space (always a good idea), you can cull dozens or hundreds of objects with a single frustum/rectangle test.
For more links on view frustrum culling try:
Or for an up-to-date search: http://www.google.com/search?q=opengl+view+frustum+culling
|const char *||argv,|
|const char *||title,|
|const char *||gameModeString,|
|smart_ptr< Host > &||host|
clients can call this to get common glut setup
|width||window width, pixels|
|height||window height, pixels|
switches to 2D drawing.
NOTE: for historical reasons, I don't follow the usual OpenGL coordinate conventions here. In 2D coordinates, positive Y down, not up. y=0 is the top of the screen. (OpenGL is flipped: positive Y is up). So be aware when 2D drawing.
|int glut::createTextureFromImage||(||const media::image_t &||image||)|
creates a texture from the given image, and returns the new texture ID
helper method to draw the edges of a frustum
restores 3D drawing (make sure to call this after calling push2D()!).