Implements Ogre's Run-Time Shader system. More...
#include <rendering/rendering.hh>
Public Types | |
enum | LightingModel { SSLM_PerVertexLighting, SSLM_PerPixelLighting, SSLM_NormalMapLightingTangentSpace, SSLM_NormalMapLightingObjectSpace } |
Public Member Functions | |
void | AddScene (ScenePtr _scene) |
Add a scene manager. More... | |
void | ApplyShadows (ScenePtr _scene) |
Apply shadows to a scene. More... | |
void | AttachEntity (Visual *vis) GAZEBO_DEPRECATED(7.0) |
Set an Ogre::Entity to use RT shaders. More... | |
void | Clear () GAZEBO_DEPRECATED(7.0) |
Clear the shader system. More... | |
void | DetachEntity (Visual *_vis) GAZEBO_DEPRECATED(7.0) |
Remove and entity. More... | |
void | Fini () |
Finalize the shader system. More... | |
void | GenerateShaders (Visual *_vis) GAZEBO_DEPRECATED(7.0) |
Generate shaders for an entity. More... | |
void | GenerateShaders (const VisualPtr &_vis) |
Generate shaders for an entity. More... | |
Ogre::PSSMShadowCameraSetup * | GetPSSMShadowCameraSetup () const |
Get the Ogre PSSM Shadows camera setup. More... | |
void | Init () |
Init the run time shader system. More... | |
void | RemoveScene (ScenePtr _scene) |
Remove a scene. More... | |
void | RemoveScene (const std::string &_scene) |
Remove a scene. More... | |
void | RemoveShadows (ScenePtr _scene) |
Remove shadows from a scene. More... | |
void | SetPerPixelLighting (bool _set) |
Set the lighting model to per pixel or per vertex. More... | |
void | Update () |
Update the RT shaders. This should not be called frequently. More... | |
void | UpdateShaders () |
Queue a call to update the shaders. More... | |
Static Public Member Functions | |
static void | AttachViewport (Ogre::Viewport *_viewport, ScenePtr _scene) |
Set a viewport to use shaders. More... | |
static void | DetachViewport (Ogre::Viewport *_viewport, ScenePtr _scene) |
Set a viewport to not use shaders. More... | |
Static Public Member Functions inherited from SingletonT< RTShaderSystem > | |
static RTShaderSystem * | Instance () |
Get an instance of the singleton. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SingletonT< RTShaderSystem > | |
SingletonT () | |
Constructor. More... | |
virtual | ~SingletonT () |
Destructor. More... | |
Implements Ogre's Run-Time Shader system.
This class allows Gazebo to generate per-pixel shaders for every material at run-time.
The type of lighting.
void gazebo::rendering::RTShaderSystem::AddScene | ( | ScenePtr | _scene | ) |
Add a scene manager.
[in] | _scene | The scene to process |
void gazebo::rendering::RTShaderSystem::ApplyShadows | ( | ScenePtr | _scene | ) |
Apply shadows to a scene.
[in] | _scene | The scene to receive shadows. |
void gazebo::rendering::RTShaderSystem::AttachEntity | ( | Visual * | vis | ) |
Set an Ogre::Entity to use RT shaders.
[in] | _vis | Visual that will use the RTShaderSystem. |
|
static |
Set a viewport to use shaders.
[in] | _viewport | The viewport to add. |
[in] | _scene | The scene that the viewport uses. |
void gazebo::rendering::RTShaderSystem::Clear | ( | ) |
Clear the shader system.
void gazebo::rendering::RTShaderSystem::DetachEntity | ( | Visual * | _vis | ) |
Remove and entity.
[in] | _vis | Remove this visual. |
|
static |
Set a viewport to not use shaders.
[in] | _viewport | The viewport to remove. |
[in] | _scene | The scene that the viewport uses. |
void gazebo::rendering::RTShaderSystem::Fini | ( | ) |
Finalize the shader system.
void gazebo::rendering::RTShaderSystem::GenerateShaders | ( | Visual * | _vis | ) |
Generate shaders for an entity.
[in] | _vis | The visual to generate shaders for. |
void gazebo::rendering::RTShaderSystem::GenerateShaders | ( | const VisualPtr & | _vis | ) |
Generate shaders for an entity.
[in] | _vis | The visual to generate shaders for. |
Ogre::PSSMShadowCameraSetup* gazebo::rendering::RTShaderSystem::GetPSSMShadowCameraSetup | ( | ) | const |
void gazebo::rendering::RTShaderSystem::Init | ( | ) |
Init the run time shader system.
void gazebo::rendering::RTShaderSystem::RemoveScene | ( | ScenePtr | _scene | ) |
Remove a scene.
[in] | The | scene to remove |
void gazebo::rendering::RTShaderSystem::RemoveScene | ( | const std::string & | _scene | ) |
Remove a scene.
[in] | Name | of the scene to remove. |
void gazebo::rendering::RTShaderSystem::RemoveShadows | ( | ScenePtr | _scene | ) |
Remove shadows from a scene.
[in] | _scene | The scene to remove shadows from. |
void gazebo::rendering::RTShaderSystem::SetPerPixelLighting | ( | bool | _set | ) |
Set the lighting model to per pixel or per vertex.
[in] | _set | True means to use per-pixel shaders. |
void gazebo::rendering::RTShaderSystem::Update | ( | ) |
Update the RT shaders. This should not be called frequently.
void gazebo::rendering::RTShaderSystem::UpdateShaders | ( | ) |
Queue a call to update the shaders.