vrj::GlDrawManager Class Reference

Concrete Singleton Class for OpenGL drawing. More...

#include <vrj/Draw/OGL/GlDrawManager.h>

Inheritance diagram for vrj::GlDrawManager:

Inheritance graph
[legend]
Collaboration diagram for vrj::GlDrawManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void start ()
 Starts the control loop.
virtual void draw ()
 Enables a frame to be drawn.
virtual void sync ()
 Blocks until the end of the frame.
void main (void *nullParam)
 This is the control loop for the manager.
virtual void initAPI ()
 Initializes the drawing API (if not already running).
virtual void addDisplay (Display *disp)
 Callback when display is added to display manager.
virtual void removeDisplay (Display *disp)
 Callback when display is removed to display manager.
virtual void closeAPI ()
 Shutdown the drawing API.
virtual void outStream (std::ostream &out)
 dumps the object's internal state
void drawAllPipes ()
 Draws all the ogl pipes/windows.
virtual void setApp (App *_app)
 Sets the app the draw should interact with.
GlAppgetApp ()
 Returns the app we are rednering.
GlUserDatacurrentUserData ()
 Gets pointer to the current user data.
int getCurrentContext ()
 Returns a unique identifier for the current context.
Config element handler implementation
virtual bool configAdd (jccl::ConfigElementPtr element)
 Adds the element to the draw manager config.
virtual bool configRemove (jccl::ConfigElementPtr element)
 Removes the element from the current configuration.
virtual bool configCanHandle (jccl::ConfigElementPtr element)
 Can the handler handle the given element?

Protected Member Functions

GlWindowgetGLWindow ()
 Factory function to get system specific OpenGL window.
void setCurrentContext (int val)
void dirtyAllWindows ()
 Sets the dirty bits off all the gl windows.
bool isValidWindow (GlWindow *win)
 Is the window a valid window for the draw manager?
 GlDrawManager ()
virtual ~GlDrawManager ()
 GlDrawManager (const GlDrawManager &o)
void operator= (const GlDrawManager &)
 vprSingletonHeader (GlDrawManager)

Protected Attributes

Config Data
int numPipes
 The number of pipes in the system.
API data
GlAppmApp
 The OpenGL application.
std::vector< GlWindow * > mWins
 A list of the windows in the system.
std::vector< GlPipe * > pipes
 A list of the pipes in the system.
Helper field data
vpr::TSObjectProxy< int > mContextId
 TS Data for context id.
vpr::TSObjectProxy< GlUserDatamUserData
 User data for draw func.
MP Stuff
vpr::Semaphore drawTriggerSema
 Semaphore for draw trigger.
vpr::Semaphore drawDoneSema
 Semaphore for drawing done.
bool mRunning
 Protects run-time config. Used to stop the drawing thread.
vpr::ThreadMemberFunctor<
GlDrawManager > * 
mMemberFunctor
vpr::Thread * mControlThread
vpr::Mutex mCreateWindowMutex
 Mutex for opening windows across pipes.

Friends

class GlPipe
class GlContextDataBase

Detailed Description

Concrete Singleton Class for OpenGL drawing.

Responsible for all OpenGL-based rendering.

vrj::GlDrawManager is an active object. It manages OpenGL pipes and windows. In addition, it triggers rendering, swapping, and syncing of the windows under its control.

All access to the OpenGL rendering structures has to happen from the control thread or in the case of context sensitive functions, from the control thread of the managed pipes. Because of this, the object uses queues to hold new windows.

Date:
1-7-98

Definition at line 82 of file GlDrawManager.h.


Constructor & Destructor Documentation

vrj::GlDrawManager::GlDrawManager (  )  [protected]

Definition at line 71 of file GlDrawManager.cpp.

00072    : mApp(NULL)
00073    , drawTriggerSema(0)
00074    , drawDoneSema(0)
00075    , mRunning(false)
00076    , mMemberFunctor(NULL)
00077    , mControlThread(NULL)
00078 {
00079 }

vrj::GlDrawManager::~GlDrawManager (  )  [protected, virtual]

Definition at line 81 of file GlDrawManager.cpp.

References closeAPI(), mControlThread, mMemberFunctor, and mRunning.

00082 {
00083    if ( mRunning )
00084    {
00085       closeAPI();
00086       mControlThread->join();
00087    }
00088 
00089    if ( NULL != mControlThread )
00090    {
00091       delete mControlThread;
00092       mControlThread = NULL;
00093    }
00094 
00095    if ( NULL != mMemberFunctor )
00096    {
00097       delete mMemberFunctor;
00098       mMemberFunctor = NULL;
00099    }
00100 }

vrj::GlDrawManager::GlDrawManager ( const GlDrawManager o  )  [inline, protected]

Definition at line 239 of file GlDrawManager.h.

00240       : DrawManager(o)
00241    {;}


Member Function Documentation

void vrj::GlDrawManager::start (  )  [virtual]

Starts the control loop.

Definition at line 135 of file GlDrawManager.cpp.

References main(), mControlThread, mMemberFunctor, mRunning, and vrjDBG_DRAW_MGR().

Referenced by initAPI().

00136 {
00137    // --- Setup Multi-Process stuff --- //
00138    // Create a new thread to handle the control
00139    mRunning = true;
00140 
00141    mMemberFunctor =
00142       new vpr::ThreadMemberFunctor<GlDrawManager>(this, &GlDrawManager::main,
00143                                                   NULL);
00144    mControlThread = new vpr::Thread(mMemberFunctor);
00145 
00146    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CONFIG_LVL)
00147       << "vrj::GlDrawManager started (thread: " << mControlThread << ")\n"
00148       << vprDEBUG_FLUSH;
00149 }

void vrj::GlDrawManager::draw (  )  [virtual]

Enables a frame to be drawn.

Implements vrj::DrawManager.

Definition at line 154 of file GlDrawManager.cpp.

References drawTriggerSema.

00155 {
00156    drawTriggerSema.release();
00157 }

void vrj::GlDrawManager::sync (  )  [virtual]

Blocks until the end of the frame.

Postcondition:
The frame has been drawn.

Implements vrj::DrawManager.

Definition at line 164 of file GlDrawManager.cpp.

References drawDoneSema.

00165 {
00166    drawDoneSema.acquire();
00167 }

void vrj::GlDrawManager::main ( void *  nullParam  ) 

This is the control loop for the manager.

Definition at line 171 of file GlDrawManager.cpp.

References drawAllPipes(), drawDoneSema, drawTriggerSema, and mRunning.

Referenced by start().

00172 {
00173    boost::ignore_unused_variable_warning(nullParam);
00174    bool stop_requested(false);
00175 
00176    while ( ! stop_requested )
00177    {
00178       //**// Runtime config will happen sometime after
00179       // drawDoneSema.release() because the kernel is the only one that
00180       // can trigger it
00181 
00182       // Wait for trigger
00183       drawTriggerSema.acquire();
00184 
00185       // To properly stop this thread we must allow it to fall through the
00186       // semaphore and not execute drawAllPipes(). Test mRunning here only
00187       // and not outside of drawTriggerSema.acquire() / drawDoneSema.release()
00188       // so we know we will always reach drawTriggerSema.acquire() when
00189       // closing, since closeAPI() expects a final drawTriggerSema.acquire()
00190       // and drawDoneSema.release().
00191       if (mRunning)
00192       {
00193          // THEN --- Do Rendering --- //
00194          drawAllPipes();
00195       }
00196       else
00197       {
00198          stop_requested = true;
00199       }
00200 
00201       // -- Done rendering --- //
00202       drawDoneSema.release();
00203    }
00204 }

void vrj::GlDrawManager::initAPI (  )  [virtual]

Initializes the drawing API (if not already running).

Postcondition:
Control thread is started.

Implements vrj::DrawManager.

Definition at line 250 of file GlDrawManager.cpp.

References start().

00251 {
00252    start();
00253 }

void vrj::GlDrawManager::addDisplay ( Display disp  )  [virtual]

Callback when display is added to display manager.

Note:
This function can only be called by the display manager functioning in the kernel thread to signal a new display added This guarantees that we are not rendering currently. We will most likely be waiting for a render trigger.

Implements vrj::DrawManager.

Definition at line 265 of file GlDrawManager.cpp.

References vrj::GlPipe::addWindow(), vrj::DrawSimInterface::config(), vrj::GlWindow::configWindow(), vrj::Viewport::getConfigElement(), vrj::GlWindow::getDisplay(), getGLWindow(), vrj::Display::getNumViewports(), vrj::Display::getPipe(), vrj::Display::getViewport(), GlPipe, vrj::DrawSimInterface::initialize(), isValidWindow(), mCreateWindowMutex, mWins, pipes, vrj::SimViewport::setDrawSimInterface(), vrj::GlPipe::start(), and vrjDBG_DRAW_MGR().

00266 {
00267    vprASSERT(disp != NULL);    // Can't add a null display
00268 
00269    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_STATE_LVL)
00270       << "vrj::GlDrawManager::addDisplay: " << disp
00271       << std::endl << vprDEBUG_FLUSH;
00272 
00273 
00274    // -- Finish Simulator setup
00275    std::vector<vrj::Viewport*>::size_type num_vp(disp->getNumViewports());
00276    std::vector<vrj::Viewport*>::size_type i;
00277 
00278    for ( i = 0 ; i < num_vp ; ++i )
00279    {
00280       Viewport* vp = disp->getViewport(i);
00281 
00282       if (vp->isSimulator())
00283       {
00284          jccl::ConfigElementPtr vp_element = vp->getConfigElement();
00285 
00286          SimViewport* sim_vp(NULL);
00287          sim_vp = dynamic_cast<SimViewport*>(vp);
00288          vprASSERT(NULL != sim_vp);
00289 
00290          sim_vp->setDrawSimInterface(NULL);
00291 
00292          // Create the simulator stuff
00293          vprASSERT(1 == vp_element->getNum("simulator_plugin") && "You must supply a simulator plugin.");
00294 
00295          // Create the simulator stuff
00296          jccl::ConfigElementPtr sim_element =
00297             vp_element->getProperty<jccl::ConfigElementPtr>("simulator_plugin");
00298 
00299          vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CONFIG_LVL)
00300             << "GlDrawManager::addDisplay() creating simulator of type '"
00301             << sim_element->getID() << "'\n" << vprDEBUG_FLUSH;
00302 
00303          DrawSimInterface* new_sim_i =
00304             GlSimInterfaceFactory::instance()->createObject(sim_element->getID());
00305 
00306          // XXX: Change this to an error once the new simulator loading code is
00307          // more robust.  -PH (4/13/2003)
00308          vprASSERT(NULL != new_sim_i && "Failed to create draw simulator");
00309          sim_vp->setDrawSimInterface(new_sim_i);
00310          new_sim_i->initialize(sim_vp);
00311          new_sim_i->config(sim_element);
00312       }
00313    }
00314 
00315 
00316    // -- Create a window for new display
00317    // -- Store the window in the wins vector
00318    // Create the gl window object.  NOTE: The glPipe actually "creates" the opengl window and context later
00319    GlWindow* new_win = getGLWindow();
00320    new_win->configWindow(disp);                                            // Configure it
00321    mWins.push_back(new_win);                                         // Add to our local window list
00322 
00323    // -- Create any needed Pipes & Start them
00324    unsigned int pipe_num = new_win->getDisplay()->getPipe();    // Find pipe to add it too
00325 
00326    if (pipes.size() < (pipe_num+1))           // ASSERT: Max index of pipes is < our pipe
00327    {                                         // +1 because if pipeNum = 0, I still need size() == 1
00328       while (pipes.size() < (pipe_num+1))     // While we need more pipes
00329       {
00330          GlPipe* new_pipe = new GlPipe(pipes.size(), this,
00331                                        &mCreateWindowMutex);  // Create a new pipe to use
00332          pipes.push_back(new_pipe);                          // Add the pipe
00333          new_pipe->start();                                  // Start the pipe running
00334                                                              // NOTE: Run pipe even if no windows.  Then it waits for windows.
00335       }
00336    }
00337 
00338    // -- Add window to the correct pipe
00339    GlPipe* pipe;                           // The pipe to assign it to
00340    pipe = pipes[pipe_num];                 // ASSERT: pipeNum is in the valid range
00341    pipe->addWindow(new_win);               // Window has been added
00342 
00343    vprASSERT(isValidWindow(new_win));      // Make sure it was added to draw manager
00344 }

void vrj::GlDrawManager::removeDisplay ( Display disp  )  [virtual]

Callback when display is removed to display manager.

Precondition:
disp must be a valid display that we have.
Postcondition:
window for disp is removed from the draw manager and child pipes.

Implements vrj::DrawManager.

Definition at line 352 of file GlDrawManager.cpp.

References vrj::GlWindow::getDisplay(), vrj::Display::getPipe(), isValidWindow(), mWins, pipes, vrj::GlPipe::removeWindow(), and vrjDBG_DRAW_MGR().

00353 {
00354    GlPipe* pipe;  pipe = NULL;
00355    GlWindow* win; win = NULL;     // Window to remove
00356 
00357    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_STATE_LVL)
00358       << "vrj::GlDrawManager::removeDisplay: " << disp
00359       << std::endl << vprDEBUG_FLUSH;
00360 
00361    for (unsigned int i=0;i<mWins.size();i++)
00362    {
00363       if (mWins[i]->getDisplay() == disp)      // FOUND it
00364       {
00365          win = mWins[i];
00366          pipe = pipes[win->getDisplay()->getPipe()];
00367       }
00368    }
00369 
00370    // Remove the window from the pipe and our local list
00371    if (win != NULL)
00372    {
00373       vprASSERT(pipe != NULL);
00374       vprASSERT(isValidWindow(win));
00375       pipe->removeWindow(win);                                                   // Remove from pipe
00376       mWins.erase(std::remove(mWins.begin(),mWins.end(),win), mWins.end());      // Remove from draw manager
00377       vprASSERT(!isValidWindow(win));
00378    }
00379    else
00380    {
00381       vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) << clrOutNORM(clrRED,"ERROR:")
00382          << "vrj::GlDrawManager::removeDisplay: Attempted to remove a display that was not found.\n"
00383          << vprDEBUG_FLUSH;
00384       vprASSERT(false);
00385    }
00386 
00387 }

void vrj::GlDrawManager::closeAPI (  )  [virtual]

Shutdown the drawing API.

Implements vrj::DrawManager.

Definition at line 391 of file GlDrawManager.cpp.

References drawDoneSema, drawTriggerSema, mControlThread, mRunning, pipes, and vrjDBG_DRAW_MGR().

Referenced by ~GlDrawManager().

00392 {
00393    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_STATE_LVL) << "vrj::GlDrawManager::closeAPI\n" << vprDEBUG_FLUSH;
00394 
00395    mRunning = false;
00396    
00397    // We must allow our control thread to fall through and die naturally.
00398    drawTriggerSema.release();     
00399    drawDoneSema.acquire();
00400    mControlThread->join();
00401 
00402    // Stop and delete all pipes
00403    unsigned int pipe_num;
00404    
00405    for (pipe_num = 0; pipe_num < pipes.size(); ++pipe_num)
00406    {
00407       pipes[pipe_num]->stop();
00408       
00409       vrj::GlPipe* old_pipe = pipes[pipe_num];
00410       
00411       pipes.erase(std::remove(pipes.begin(), pipes.end(), old_pipe));
00412       delete old_pipe;
00413    }
00414 
00415    // TODO: We must fix the closing of EventWindows and GlWindows before we can do this.
00416    // Close and delete all glWindows
00417 }

void vrj::GlDrawManager::outStream ( std::ostream &  out  )  [virtual]

dumps the object's internal state

Reimplemented from vrj::DrawManager.

Definition at line 496 of file GlDrawManager.cpp.

References mApp, and mWins.

00497 {
00498     out     << clrSetNORM(clrGREEN)
00499             << "========== GlDrawManager: " << (void*)this << " ========="
00500             << clrRESET << std::endl
00501             << clrOutNORM(clrCYAN,"\tapp: ") << (void*)mApp << std::endl
00502             << clrOutNORM(clrCYAN,"\tWindow count: ") << mWins.size()
00503             << std::endl << std::flush;
00504 
00505     for (unsigned int i = 0; i < mWins.size(); i++)
00506     {
00507        vprASSERT(mWins[i] != NULL);
00508        out << clrOutNORM(clrCYAN,"\tGlWindow:\n") << *(mWins[i]) << std::endl;
00509     }
00510     out << "=======================================" << std::endl;
00511 }

void vrj::GlDrawManager::drawAllPipes (  ) 

Draws all the ogl pipes/windows.

Definition at line 206 of file GlDrawManager.cpp.

References pipes, and vrjDBG_DRAW_MGR().

Referenced by main().

00207 {
00208    vprDEBUG_OutputGuard(vrjDBG_DRAW_MGR, vprDBG_HVERB_LVL,
00209                         "vrj::GLDrawManager::drawAllPipes()\n",
00210                         "vrj::GLDrawManager::drawAllPipes() done.\n");
00211    unsigned int pipe_num;
00212 
00213    // RENDER
00214    // Start rendering all the pipes
00215    for (pipe_num = 0; pipe_num < pipes.size(); ++pipe_num)
00216    {
00217       pipes[pipe_num]->triggerRender();
00218    }
00219 
00220       // Wait for rendering to finish on all the pipes
00221    for (pipe_num = 0; pipe_num < pipes.size(); ++pipe_num)
00222    {
00223       pipes[pipe_num]->completeRender();
00224    }
00225 
00226    // Barrier for Cluster
00227    //vprDEBUG(vprDBG_ALL, vprDBG_STATE_LVL) <<  "BARRIER: Going to sleep for: " << num << std::endl << vprDEBUG_FLUSH;
00228    cluster::ClusterManager::instance()->createBarrier();
00229    //vprDEBUG(vprDBG_ALL, vprDBG_STATE_LVL) <<  "BARRIER: IS DONE" << std::endl << vprDEBUG_FLUSH;
00230 
00231 
00232    // SWAP
00233    // Start swapping all the pipes
00234    for (pipe_num = 0; pipe_num < pipes.size(); ++pipe_num)
00235    {
00236       pipes[pipe_num]->triggerSwap();
00237    }
00238 
00239    // Wait for swapping to finish on all the pipes
00240    for (pipe_num = 0; pipe_num < pipes.size(); ++pipe_num)
00241    {
00242       pipes[pipe_num]->completeSwap();
00243    }
00244 }

void vrj::GlDrawManager::setApp ( App _app  )  [virtual]

Sets the app the draw should interact with.

Implements vrj::DrawManager.

Definition at line 103 of file GlDrawManager.cpp.

References dirtyAllWindows(), and mApp.

00104 {
00105    mApp = dynamic_cast<GlApp*>(_app);
00106 
00107    // We have a new app, so the contexts must be re-initialized
00108    // so... dirty them all.
00109    dirtyAllWindows();
00110 
00111    if ( NULL == mApp )
00112    {
00113       vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL)
00114          << clrOutBOLD(clrRED, "ERROR:")
00115          << " [vrj::GlDrawManager::setApp()] Failed to downcast "
00116          << std::endl << vprDEBUG_FLUSH;
00117       vprDEBUG_NEXT(vprDBG_ERROR, vprDBG_CRITICAL_LVL)
00118          << "application object from vrj::App to vrj::GlApp!" << std::endl
00119          << vprDEBUG_FLUSH;
00120       vprDEBUG_NEXT(vprDBG_ERROR, vprDBG_CRITICAL_LVL)
00121          << "Type of object " << std::hex << _app << std::dec << " is "
00122          << typeid(_app).name() << std::endl << vprDEBUG_FLUSH;
00123 
00124       throw vrj::DrawMgrException("Object not of type vrj::GlApp");
00125    }
00126 }

GlApp * vrj::GlDrawManager::getApp (  ) 

Returns the app we are rednering.

Definition at line 129 of file GlDrawManager.cpp.

References mApp.

Referenced by vrj::GlPipe::controlLoop().

00130 {
00131    return mApp;
00132 }

bool vrj::GlDrawManager::configAdd ( jccl::ConfigElementPtr  element  )  [virtual]

Adds the element to the draw manager config.

Precondition:
configCanHandle(element) == true
Returns:
success

Definition at line 424 of file GlDrawManager.cpp.

00425 {
00426    boost::ignore_unused_variable_warning(element);
00427    return false;
00428 }

bool vrj::GlDrawManager::configRemove ( jccl::ConfigElementPtr  element  )  [virtual]

Removes the element from the current configuration.

Precondition:
configCanHandle(element) == true
Returns:
success

Definition at line 435 of file GlDrawManager.cpp.

00436 {
00437    boost::ignore_unused_variable_warning(element);
00438    return false;
00439 }

bool vrj::GlDrawManager::configCanHandle ( jccl::ConfigElementPtr  element  )  [virtual]

Can the handler handle the given element?

Returns:
true if we can handle it; false if we can't.

Definition at line 445 of file GlDrawManager.cpp.

00446 {
00447    boost::ignore_unused_variable_warning(element);
00448    return false;
00449 }

GlUserData * vrj::GlDrawManager::currentUserData (  ) 

Gets pointer to the current user data.

Should be used in the draw function.

Note:
This user data is valid ONLY in draw(). It is not valid anywhere else.

Definition at line 451 of file GlDrawManager.cpp.

Referenced by vrj::OsgApp::draw(), and vrj::OpenSGApp::draw().

00452 {
00453    return &(*mUserData);
00454 }

int vrj::GlDrawManager::getCurrentContext (  ) 

Returns a unique identifier for the current context.

Note:
This id is ONLY valid in contextInit() and draw().

Definition at line 456 of file GlDrawManager.cpp.

References mContextId.

00457 {
00458    return (*mContextId);
00459 }

vrj::GlWindow * vrj::GlDrawManager::getGLWindow (  )  [protected]

Factory function to get system specific OpenGL window.

Postcondition:
Returns an OpenGL window for the current system.

Definition at line 527 of file GlDrawManager.cpp.

Referenced by addDisplay().

00528 {
00529 #if  defined(VPR_OS_Windows)
00530    return new vrj::GlWindowWin32;
00531 #elif defined(VPR_OS_Darwin) && ! defined(VRJ_USE_X11)
00532    return new vrj::GlWindowOSX;
00533 #else
00534    return new vrj::GlWindowXWin;
00535 #endif
00536 }

void vrj::GlDrawManager::setCurrentContext ( int  val  )  [protected]

Definition at line 461 of file GlDrawManager.cpp.

00462 {
00463    (*mContextId) = val;
00464 }

void vrj::GlDrawManager::dirtyAllWindows (  )  [protected]

Sets the dirty bits off all the gl windows.

Dirty all the window contexts.

Definition at line 470 of file GlDrawManager.cpp.

References mWins.

Referenced by setApp().

00471 {
00472     // Create Pipes & Add all windows to the correct pipe
00473    for (unsigned int winId=0;winId<mWins.size();winId++)   // For each window we created
00474    {
00475       mWins[winId]->setDirtyContext(true);
00476    }
00477 }

bool vrj::GlDrawManager::isValidWindow ( GlWindow win  )  [protected]

Is the window a valid window for the draw manager?

Definition at line 480 of file GlDrawManager.cpp.

References mWins.

Referenced by addDisplay(), and removeDisplay().

00481 {
00482    bool ret_val = false;
00483    for (unsigned int i=0;i<mWins.size();i++)
00484    {
00485       if (mWins[i] == win)
00486       {
00487          ret_val = true;
00488       }
00489    }
00490 
00491    return ret_val;
00492 }

void vrj::GlDrawManager::operator= ( const GlDrawManager  )  [inline, protected]

Definition at line 243 of file GlDrawManager.h.

00243 {;}

vrj::GlDrawManager::vprSingletonHeader ( GlDrawManager   )  [protected]


Friends And Related Function Documentation

friend class GlPipe [friend]

Definition at line 85 of file GlDrawManager.h.

Referenced by addDisplay().

friend class GlContextDataBase [friend]

Definition at line 86 of file GlDrawManager.h.


Member Data Documentation

int vrj::GlDrawManager::numPipes [protected]

The number of pipes in the system.

Definition at line 201 of file GlDrawManager.h.

GlApp* vrj::GlDrawManager::mApp [protected]

The OpenGL application.

Definition at line 206 of file GlDrawManager.h.

Referenced by getApp(), outStream(), and setApp().

std::vector<GlWindow*> vrj::GlDrawManager::mWins [protected]

A list of the windows in the system.

Definition at line 207 of file GlDrawManager.h.

Referenced by addDisplay(), dirtyAllWindows(), isValidWindow(), outStream(), and removeDisplay().

std::vector<GlPipe*> vrj::GlDrawManager::pipes [protected]

A list of the pipes in the system.

Definition at line 208 of file GlDrawManager.h.

Referenced by addDisplay(), closeAPI(), drawAllPipes(), and removeDisplay().

vpr::TSObjectProxy<int> vrj::GlDrawManager::mContextId [protected]

TS Data for context id.

Definition at line 213 of file GlDrawManager.h.

Referenced by getCurrentContext().

vpr::TSObjectProxy<GlUserData> vrj::GlDrawManager::mUserData [protected]

User data for draw func.

Definition at line 214 of file GlDrawManager.h.

vpr::Semaphore vrj::GlDrawManager::drawTriggerSema [protected]

Semaphore for draw trigger.

Definition at line 219 of file GlDrawManager.h.

Referenced by closeAPI(), draw(), and main().

vpr::Semaphore vrj::GlDrawManager::drawDoneSema [protected]

Semaphore for drawing done.

Definition at line 220 of file GlDrawManager.h.

Referenced by closeAPI(), main(), and sync().

bool vrj::GlDrawManager::mRunning [protected]

Protects run-time config. Used to stop the drawing thread.

Only when this semaphore is acquired can run-time config occur.

Definition at line 226 of file GlDrawManager.h.

Referenced by closeAPI(), main(), start(), and ~GlDrawManager().

vpr::ThreadMemberFunctor<GlDrawManager>* vrj::GlDrawManager::mMemberFunctor [protected]

Definition at line 228 of file GlDrawManager.h.

Referenced by start(), and ~GlDrawManager().

vpr::Thread* vrj::GlDrawManager::mControlThread [protected]

Definition at line 229 of file GlDrawManager.h.

Referenced by closeAPI(), start(), and ~GlDrawManager().

vpr::Mutex vrj::GlDrawManager::mCreateWindowMutex [protected]

Mutex for opening windows across pipes.

Definition at line 230 of file GlDrawManager.h.

Referenced by addDisplay().


The documentation for this class was generated from the following files:
Generated on Thu Jan 4 10:58:14 2007 for VR Juggler by  doxygen 1.5.1