#include <vrj/Draw/Pf/PfApp.h>
Inheritance diagram for vrj::PfApp:


Public Member Functions | |
| PfApp (Kernel *kern=NULL) | |
| virtual | ~PfApp () |
| virtual void | initScene ()=0 |
| Initializes the scene graph. | |
| virtual void | preForkInit () |
| Called between pfInit and pfConfig. | |
| virtual void | appChanFunc (pfChannel *chan) |
| Function called in application process for each active channel each frame. | |
| virtual pfGroup * | getScene ()=0 |
| Returns the current scene graph. | |
| virtual void | configPWin (pfPipeWindow *pWin) |
| Initializes a pWin. | |
| virtual std::vector< int > | getFrameBufferAttrs () |
| Returns the needed parameters for the performer framebuffer. | |
| virtual void | drawChan (pfChannel *chan, void *chandata) |
| Function called in the channel draw function to do the actual drawing. | |
| virtual void | preDrawChan (pfChannel *chan, void *chandata) |
| Function called by the DEFAULT drawChan function before clearing the channel and drawing the next frame (pfFrame()). | |
| virtual void | postDrawChan (pfChannel *chan, void *chandata) |
| Function called by the DEFAULT drawChan function after clearing the channel and drawing the next frame (pfFrame()). | |
| virtual DrawManager * | getDrawManager () |
| Gets the Draw Manager to use. | |
This class defines the class that Performer application classes should be derived from. The interface defined by this class is what the Performer Draw Manager will use to interact with the user's application.
Definition at line 60 of file PfApp.h.
| vrj::PfApp::PfApp | ( | Kernel * | kern = NULL |
) |
| vrj::PfApp::~PfApp | ( | ) | [virtual] |
| virtual void vrj::PfApp::initScene | ( | ) | [pure virtual] |
Initializes the scene graph.
Called after pfInit and pfConfig but before apiInit.
Referenced by vrj::PfDrawManager::initAppGraph().
| virtual void vrj::PfApp::preForkInit | ( | ) | [inline, virtual] |
Called between pfInit and pfConfig.
This function allows the user application to do any processing that needs to happen before performer forks its processes off but after pfInit().
Definition at line 80 of file PfApp.h.
Referenced by vrj::PfDrawManager::initAPI().
| virtual void vrj::PfApp::appChanFunc | ( | pfChannel * | chan | ) | [inline, virtual] |
Function called in application process for each active channel each frame.
Called immediately before draw (pfFrame()). XXX: Should maybe only call this for one "master" channel each frame.
Definition at line 87 of file PfApp.h.
Referenced by vrj::PfDrawManager::callAppChanFuncs().
| virtual pfGroup* vrj::PfApp::getScene | ( | ) | [pure virtual] |
Returns the current scene graph.
This function must be defined so that the Performer Draw Manager can get a scene graph to draw.
Make sure that the node returned is NOT a pfScene. If it is, then lighting will NOT work.
Referenced by vrj::PfDrawManager::initAppGraph().
| virtual void vrj::PfApp::configPWin | ( | pfPipeWindow * | pWin | ) | [inline, virtual] |
Initializes a pWin.
Called by the Performer Draw Manager as soon as the pwin is opened.
Definition at line 108 of file PfApp.h.
Referenced by vrj::PFconfigPWin().
| virtual std::vector<int> vrj::PfApp::getFrameBufferAttrs | ( | ) | [inline, virtual] |
Returns the needed parameters for the performer framebuffer.
Definition at line 119 of file PfApp.h.
Referenced by vrj::PfDrawManager::getMonoFBConfig(), and vrj::PfDrawManager::getStereoFBConfig().
| virtual void vrj::PfApp::drawChan | ( | pfChannel * | chan, | |
| void * | chandata | |||
| ) | [inline, virtual] |
Function called in the channel draw function to do the actual drawing.
For most programs the default behavior of this function is correct. It simply does the following:
chan->clear();
pfDraw();
Advanced users may want to overide this behavior for advanced rendering effects such as over-lays, or multi-pass rendering. See the Performer man pages about overiding the draw traversal function. This function is the draw traversal function but with the projections set correctly for the given display and eye.
Definition at line 141 of file PfApp.h.
References vrjDBG_DRAW_MGR().
00142 { 00143 vprDEBUG_OutputGuard(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL, 00144 std::string("--- vrj::PfApp::drawChan() Entered ---\n"), 00145 std::string("--- vrj::PfApp::drawChan() Exited ---\n")); 00146 this->preDrawChan(chan,chandata); 00147 chan->clear(); // Clear the channel 00148 pfDraw(); // Draw the channel 00149 this->postDrawChan(chan,chandata); 00150 }
| virtual void vrj::PfApp::preDrawChan | ( | pfChannel * | chan, | |
| void * | chandata | |||
| ) | [inline, virtual] |
| virtual void vrj::PfApp::postDrawChan | ( | pfChannel * | chan, | |
| void * | chandata | |||
| ) | [inline, virtual] |
| DrawManager * vrj::PfApp::getDrawManager | ( | ) | [virtual] |
1.5.1