Changeset 1615 for code/branches/hud/src/orxonox/overlays/hud/HUDFPSText.cc
- Timestamp:
- Jun 22, 2008, 12:06:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/overlays/hud/HUDFPSText.cc
r1614 r1615 35 35 namespace orxonox 36 36 { 37 CreateFactory(HUDFPSText);37 CreateFactory(HUDFPSText); 38 38 39 HUDFPSText::HUDFPSText()40 {41 RegisterObject(HUDFPSText);42 }39 HUDFPSText::HUDFPSText() 40 { 41 RegisterObject(HUDFPSText); 42 } 43 43 44 HUDFPSText::~HUDFPSText() 45 { 46 if (this->isInitialized()) 44 HUDFPSText::~HUDFPSText() 47 45 { 48 46 } 49 }50 47 51 void HUDFPSText::tick(float dt)52 {53 float fps = GraphicsEngine::getSingleton().getAverageFPS();54 this->text_->setCaption(this->getCaption() + convertToString(fps));55 }48 void HUDFPSText::tick(float dt) 49 { 50 float fps = GraphicsEngine::getSingleton().getAverageFPS(); 51 this->text_->setCaption(this->getCaption() + convertToString(fps)); 52 } 56 53 }
Note: See TracChangeset
for help on using the changeset viewer.