Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9351 in orxonox.OLD for branches/proxy/src/lib/graphics


Ignore:
Timestamp:
Jul 20, 2006, 12:06:50 PM (18 years ago)
Author:
bensch
Message:

fps display can be toggeled

Location:
branches/proxy/src/lib/graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/graphics/graphics_engine.cc

    r8740 r9351  
    5050 #include "static_model.h"
    5151#endif
    52 using namespace std;
    5352
    5453SHELL_COMMAND(wireframe, GraphicsEngine, wireframe);
    55 
     54SHELL_COMMAND(fps, GraphicsEngine, toggleFPSdisplay);
    5655
    5756/**
     
    611610  {
    612611    //draw the graphics effects
    613     list<BaseObject*>::const_iterator it;
     612    std::list<BaseObject*>::const_iterator it;
    614613    for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
    615614      dynamic_cast<GraphicsEffect*>(*it)->draw();
     
    618617  Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
    619618  Shader::restoreShader();
     619}
     620
     621
     622void GraphicsEngine::toggleFPSdisplay()
     623{
     624  this->displayFPS(!this->bDisplayFPS);
    620625}
    621626
  • branches/proxy/src/lib/graphics/graphics_engine.h

    r8518 r9351  
    7474    void drawBackgroundElements() const;
    7575    void draw() const;
     76    void toggleFPSdisplay();
    7677    void displayFPS(bool display);
    7778
Note: See TracChangeset for help on using the changeset viewer.