Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 26, 2011, 8:50:06 PM (13 years ago)
Author:
landauf
Message:

slight rework of the Shader class:

  • correctly loads and initializes active and inactive shaders in different scenes
  • uses the fast Ogre::CompositorManager::getSingleton().setCompositorEnabled() instead of the slow compositorInstance_→setEnabled() to change the visibility of a shader
  • uses consistently GraphicsManager::getInstance().getViewport() to get the viewport - this is not optimal, scenemanager→getCurrentViewport() would be better, however this returns NULL when displaying a new scene for the first time
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/src/orxonox/graphics/GlobalShader.cc

    r5781 r7972  
    6161        SUPER(GlobalShader, XMLPort, xmlelement, mode);
    6262
    63         XMLPortParamExtern(GlobalShader, Shader, &this->shader_, "compositor", setCompositor, getCompositor, xmlelement, mode);
     63        XMLPortParamExtern(GlobalShader, Shader, &this->shader_, "compositor", setCompositorName, getCompositorName, xmlelement, mode);
    6464    }
    6565
     
    6767    {
    6868        registerVariable(this->bVisible_,                                         VariableDirection::ToClient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
    69         registerVariable(const_cast<std::string&>(this->shader_.getCompositor()), VariableDirection::ToClient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
     69        registerVariable(const_cast<std::string&>(this->shader_.getCompositorName()), VariableDirection::ToClient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositorName));
    7070    }
    7171
Note: See TracChangeset for help on using the changeset viewer.