#include <vrj/Draw/OGL/GlProcApp.h>
Inheritance diagram for vrj::GlProcAppWrapper:


Public Types | |
| typedef boost::function0< void > | callback_t |
Public Member Functions | |
| virtual void | contextInit () |
| Function that is called immediately after a new context is created. | |
| virtual void | preFrame () |
| Executes any code needed to set up the application object state prior to rendering the scene. | |
| virtual void | intraFrame () |
| Function called during this application's drawing time. | |
| virtual void | postFrame () |
| Function called before updating input devices but after the frame rendering is complete. | |
| virtual void | bufferPreDraw () |
| Function that is called once for each frame buffer of an OpenGL context. | |
| virtual void | draw () |
| Function that renders the scene. | |
Getters and setters for the callback methods | |
| void | setDrawMethod (callback_t f) |
| void | setContextInitMethod (callback_t f) |
| void | setBufferPredrawMethod (callback_t f) |
| void | setPreFrameMethod (callback_t f) |
| void | setPostFrameMethod (callback_t f) |
| void | setIntraFrameMethod (callback_t f) |
Protected Member Functions | |
| GlProcAppWrapper () | |
| Type for callbacks. | |
| virtual | ~GlProcAppWrapper () |
| vprSingletonHeader (GlProcAppWrapper) | |
Protected Attributes | |
| callback_t | mDrawMethod |
| callback_t | mContextInit |
| callback_t | mPreframeMethod |
| callback_t | mPostframeMethod |
| callback_t | mIntraframeMethod |
| callback_t | mBufferPredrawMethod |
Callbacks are registered with this class using helper functions. Those callbacks are invoked indirectly by the VR Juggler kernel through the vrj::App and vrj::GlApp interface methods implemented in this class.
Definition at line 54 of file GlProcApp.h.
| typedef boost::function0<void> vrj::GlProcAppWrapper::callback_t |
Definition at line 57 of file GlProcApp.h.
| vrj::GlProcAppWrapper::GlProcAppWrapper | ( | ) | [protected] |
Type for callbacks.
Definition at line 44 of file GlProcApp.cpp.
00045 : vrj::GlApp() 00046 { 00047 ; 00048 }
| vrj::GlProcAppWrapper::~GlProcAppWrapper | ( | ) | [protected, virtual] |
| vrj::GlProcAppWrapper::vprSingletonHeader | ( | GlProcAppWrapper | ) | [protected] |
| void vrj::GlProcAppWrapper::setDrawMethod | ( | callback_t | f | ) | [inline] |
| void vrj::GlProcAppWrapper::setContextInitMethod | ( | callback_t | f | ) | [inline] |
| void vrj::GlProcAppWrapper::setBufferPredrawMethod | ( | callback_t | f | ) | [inline] |
| void vrj::GlProcAppWrapper::setPreFrameMethod | ( | callback_t | f | ) | [inline] |
| void vrj::GlProcAppWrapper::setPostFrameMethod | ( | callback_t | f | ) | [inline] |
| void vrj::GlProcAppWrapper::setIntraFrameMethod | ( | callback_t | f | ) | [inline] |
| void vrj::GlProcAppWrapper::contextInit | ( | ) | [virtual] |
Function that is called immediately after a new context is created.
Use this function to create context-specific data structures such as display lists and texture objects that are known to be required when the context is created.
Reimplemented from vrj::GlApp.
Definition at line 55 of file GlProcApp.cpp.
References mContextInit.
00056 { 00057 if ( ! mContextInit.empty() ) 00058 { 00059 mContextInit(); 00060 } 00061 }
| void vrj::GlProcAppWrapper::preFrame | ( | ) | [virtual] |
Executes any code needed to set up the application object state prior to rendering the scene.
This is invoked by the kernel once per pass through the Juggler frame loop. This is called after input device updates but before the start of rendering a new frame of the scene.
Reimplemented from vrj::App.
Definition at line 63 of file GlProcApp.cpp.
References mPreframeMethod.
00064 { 00065 if ( ! mPreframeMethod.empty() ) 00066 { 00067 mPreframeMethod(); 00068 } 00069 }
| void vrj::GlProcAppWrapper::intraFrame | ( | ) | [virtual] |
Function called during this application's drawing time.
This can be used for "free" parallel processing, but it introduces a critical section to the code. If the rendering process is reading state data, this method should not be modifying any of that data. Instead, a double- or triple-buffering scheme must be used to allow parallel reading and writing of all application state used for rendering.
Reimplemented from vrj::App.
Definition at line 71 of file GlProcApp.cpp.
References mIntraframeMethod.
00072 { 00073 if ( ! mIntraframeMethod.empty() ) 00074 { 00075 mIntraframeMethod(); 00076 } 00077 }
| void vrj::GlProcAppWrapper::postFrame | ( | ) | [virtual] |
Function called before updating input devices but after the frame rendering is complete.
Reimplemented from vrj::App.
Definition at line 79 of file GlProcApp.cpp.
References mPostframeMethod.
00080 { 00081 if ( ! mPostframeMethod.empty() ) 00082 { 00083 mPostframeMethod(); 00084 } 00085 }
| void vrj::GlProcAppWrapper::bufferPreDraw | ( | ) | [virtual] |
Function that is called once for each frame buffer of an OpenGL context.
This function is executed after contextInit() (if needed) but before contextPreDraw(). It is called once per frame buffer (see note).
Reimplemented from vrj::GlApp.
Definition at line 87 of file GlProcApp.cpp.
References mBufferPredrawMethod.
00088 { 00089 if ( ! mBufferPredrawMethod.empty() ) 00090 { 00091 mBufferPredrawMethod(); 00092 } 00093 }
| void vrj::GlProcAppWrapper::draw | ( | ) | [virtual] |
Function that renders the scene.
Override this function with the user rendering routine.
Implements vrj::GlApp.
Definition at line 95 of file GlProcApp.cpp.
References mDrawMethod.
00096 { 00097 if ( ! mDrawMethod.empty() ) 00098 { 00099 mDrawMethod(); 00100 } 00101 }
callback_t vrj::GlProcAppWrapper::mDrawMethod [protected] |
callback_t vrj::GlProcAppWrapper::mContextInit [protected] |
callback_t vrj::GlProcAppWrapper::mPreframeMethod [protected] |
callback_t vrj::GlProcAppWrapper::mPostframeMethod [protected] |
callback_t vrj::GlProcAppWrapper::mIntraframeMethod [protected] |
1.5.1