MainLoop Class Reference

#include <MainLoop.h>

List of all members.

Public Member Functions

 MainLoop ()
virtual ~MainLoop ()
void addMainLoop (MainLoopI *MainLoop)
bool mainLoop ()
void draw ()
void clear ()
bool getFlip ()
void swapBuffers ()
ClockgetTimer ()
void exitLoop ()
bool & getDrawLogging ()

Protected Member Functions

void simulate (float frameTime)
void addNew ()

Protected Attributes

std::list< MainLoopI * > newMainLoops_
std::set< MainLoopI * > mainLoops_
Clock fTimer_
Clock dTimer_
float drawTime_
float clearTime_
float totalTime_
bool exitLoop_
bool drawLogging_


Detailed Description

Definition at line 29 of file MainLoop.h.


Constructor & Destructor Documentation

MainLoop::MainLoop (  ) 

Definition at line 30 of file MainLoop.cpp.

MainLoop::~MainLoop (  )  [virtual]

Definition at line 38 of file MainLoop.cpp.


Member Function Documentation

void MainLoop::addMainLoop ( MainLoopI MainLoop  ) 

Definition at line 50 of file MainLoop.cpp.

References newMainLoops_.

Referenced by ScorchedClient::ScorchedClient().

bool MainLoop::mainLoop (  ) 

Definition at line 71 of file MainLoop.cpp.

References addNew(), exitLoop_, fTimer_, Clock::getTimeDifference(), simulate(), and totalTime_.

void MainLoop::draw (  ) 

Definition at line 101 of file MainLoop.cpp.

References clearTime_, MainLoopI::draw(), drawLogging_, drawTime_, dTimer_, S3D::formatStringBuffer(), Clock::getTimeDifference(), GL_BLEND, GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, glClear(), glGetBooleanv(), Logger::log(), mainLoops_, swapBuffers(), and totalTime_.

Referenced by ClientMain::clientMain().

void MainLoop::clear (  ) 

Definition at line 43 of file MainLoop.cpp.

References exitLoop_, mainLoops_, and newMainLoops_.

Referenced by ScorchedClient::ScorchedClient().

bool MainLoop::getFlip (  ) 

void MainLoop::swapBuffers (  ) 

Definition at line 64 of file MainLoop.cpp.

Referenced by draw(), and ProgressDialogSync::progressChange().

Clock& MainLoop::getTimer (  )  [inline]

Definition at line 43 of file MainLoop.h.

References fTimer_.

Referenced by ClientNewGameHandler::actualProcessMessage(), and AnimatedBackdropDialog::init().

void MainLoop::exitLoop (  )  [inline]

Definition at line 45 of file MainLoop.h.

References exitLoop_.

Referenced by QuitDialog::buttonDown(), ClientMain::clientEventLoop(), ConsoleMethods::exit(), and StartDialog::mouseDown().

bool& MainLoop::getDrawLogging (  )  [inline]

Definition at line 46 of file MainLoop.h.

References drawLogging_.

void MainLoop::simulate ( float  frameTime  )  [protected]

Definition at line 88 of file MainLoop.cpp.

References mainLoops_, and MainLoopI::simulate().

Referenced by mainLoop().

void MainLoop::addNew (  )  [protected]

Definition at line 55 of file MainLoop.cpp.

References mainLoops_, and newMainLoops_.

Referenced by mainLoop().


Member Data Documentation

std::list<MainLoopI *> MainLoop::newMainLoops_ [protected]

Definition at line 49 of file MainLoop.h.

Referenced by addMainLoop(), addNew(), and clear().

std::set<MainLoopI *> MainLoop::mainLoops_ [protected]

Definition at line 50 of file MainLoop.h.

Referenced by addNew(), clear(), draw(), and simulate().

Clock MainLoop::fTimer_ [protected]

Definition at line 51 of file MainLoop.h.

Referenced by getTimer(), and mainLoop().

Clock MainLoop::dTimer_ [protected]

Definition at line 52 of file MainLoop.h.

Referenced by draw().

float MainLoop::drawTime_ [protected]

Definition at line 53 of file MainLoop.h.

Referenced by draw().

float MainLoop::clearTime_ [protected]

Definition at line 53 of file MainLoop.h.

Referenced by draw().

float MainLoop::totalTime_ [protected]

Definition at line 54 of file MainLoop.h.

Referenced by draw(), and mainLoop().

bool MainLoop::exitLoop_ [protected]

Definition at line 55 of file MainLoop.h.

Referenced by clear(), exitLoop(), and mainLoop().

bool MainLoop::drawLogging_ [protected]

Definition at line 56 of file MainLoop.h.

Referenced by draw(), and getDrawLogging().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:04 2009 for Scorched3D by  doxygen 1.5.3