Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9406 in orxonox.OLD for trunk/src/lib/graphics/graphics_engine.cc


Ignore:
Timestamp:
Jul 24, 2006, 11:09:47 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy back

merged with commandsvn merge -r9346:HEAD https://svn.orxonox.net/orxonox/branches/proxy .

no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r8740 r9406  
    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/**
     
    6766  this->bDisplayFPS = false;
    6867  this->bAntialiasing = false;
     68  this->bDedicated = false;
    6969  this->minFPS = 9999;
    7070  this->maxFPS = 0;
     
    164164  MultiType textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "1");
    165165  Texture::setTextureEnableState(textures.getBool());
     166
     167  // check it is a dedicated network node: so no drawings are made
     168  MultiType dedicated = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_NO_RENDER, "0");
     169  this->bDedicated = dedicated.getBool();
    166170
    167171  // searching for a usefull resolution
     
    604608}
    605609
     610/**
     611 * this draws the graphics engines graphics effecs
     612 */
    606613void GraphicsEngine::draw() const
    607614{
    608   //  LightManager::getInstance()->draw();
    609 
    610   if (this->graphicsEffects != NULL)
     615  if( this->graphicsEffects != NULL)
    611616  {
    612617    //draw the graphics effects
    613     list<BaseObject*>::const_iterator it;
     618    std::list<BaseObject*>::const_iterator it;
    614619    for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
    615620      dynamic_cast<GraphicsEffect*>(*it)->draw();
     
    618623  Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
    619624  Shader::restoreShader();
     625}
     626
     627
     628void GraphicsEngine::toggleFPSdisplay()
     629{
     630  this->displayFPS(!this->bDisplayFPS);
    620631}
    621632
Note: See TracChangeset for help on using the changeset viewer.