All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
gazebo::rendering::RTShaderSystem Class Reference

Implements Ogre's Run-Time Shader system. More...

#include <rendering/rendering.hh>

Inheritance diagram for gazebo::rendering::RTShaderSystem:
Inheritance graph
[legend]

Public Types

enum  LightingModel { SSLM_PerVertexLighting, SSLM_PerPixelLighting, SSLM_NormalMapLightingTangentSpace, SSLM_NormalMapLightingObjectSpace }
  More...
 

Public Member Functions

void AddScene (Scene *_scene)
 Add a scene manager.
 
void ApplyShadows (Scene *_scene)
 Apply shadows to a scene.
 
void AttachEntity (Visual *vis)
 Set an Ogre::Entity to use RT shaders.
 
void Clear ()
 Clear the shader system.
 
void DetachEntity (Visual *_vis)
 Remove and entity.
 
void Fini ()
 Finalize the shader system.
 
void GenerateShaders (Visual *_vis)
 Generate shaders for an entity.
 
void Init ()
 Init the run time shader system.
 
void RemoveScene (Scene *_scene)
 Remove a scene.
 
void RemoveShadows (Scene *_scene)
 Remove shadows from a scene.
 
void SetPerPixelLighting (bool _set)
 Set the lighting model to per pixel or per vertex.
 
void UpdateShaders ()
 Update the shaders. This should not be called frequently.
 

Static Public Member Functions

static void AttachViewport (Ogre::Viewport *_viewport, Scene *_scene)
 Set a viewport to use shaders.
 
static void DetachViewport (Ogre::Viewport *_viewport, Scene *_scene)
 Set a viewport to not use shaders.
 
- Static Public Member Functions inherited from SingletonT< T >
static T * Instance ()
 Get an instance of the singleton.
 

Additional Inherited Members

- Protected Member Functions inherited from SingletonT< T >
 SingletonT ()
 Constructor.
 
virtual ~SingletonT ()
 Destructor.
 

Detailed Description

Implements Ogre's Run-Time Shader system.

This class allows Gazebo to generate per-pixel shaders for every material at run-time.

Member Enumeration Documentation

The type of lighting.

Enumerator:
SSLM_PerVertexLighting 

Per-Vertex lighting: best performance.

SSLM_PerPixelLighting 

Per-Pixel lighting: best look.

SSLM_NormalMapLightingTangentSpace 

Normal Map lighting: lighting calculations have been stored in a light map (texture) using tangent space.

SSLM_NormalMapLightingObjectSpace 

Normal Map lighting: lighting calculations have been stored in a light map (texture) using object space.

Member Function Documentation

void gazebo::rendering::RTShaderSystem::AddScene ( Scene _scene)

Add a scene manager.

Parameters
[in]_sceneThe scene to process
void gazebo::rendering::RTShaderSystem::ApplyShadows ( Scene _scene)

Apply shadows to a scene.

Parameters
[in]_sceneThe scene to receive shadows.
void gazebo::rendering::RTShaderSystem::AttachEntity ( Visual vis)

Set an Ogre::Entity to use RT shaders.

Parameters
[in]_visVisual that will use the RTShaderSystem.
static void gazebo::rendering::RTShaderSystem::AttachViewport ( Ogre::Viewport *  _viewport,
Scene _scene 
)
static

Set a viewport to use shaders.

Parameters
[in]_viewportThe viewport to add.
[in]_sceneThe scene that the viewport uses.
void gazebo::rendering::RTShaderSystem::Clear ( )

Clear the shader system.

void gazebo::rendering::RTShaderSystem::DetachEntity ( Visual _vis)

Remove and entity.

Parameters
[in]_visRemove this visual.
static void gazebo::rendering::RTShaderSystem::DetachViewport ( Ogre::Viewport *  _viewport,
Scene _scene 
)
static

Set a viewport to not use shaders.

Parameters
[in]_viewportThe viewport to remove.
[in]_sceneThe 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.

Parameters
[in]_visThe visual to generate shaders for.
void gazebo::rendering::RTShaderSystem::Init ( )

Init the run time shader system.

void gazebo::rendering::RTShaderSystem::RemoveScene ( Scene _scene)

Remove a scene.

Parameters
[in]Thescene to remove
void gazebo::rendering::RTShaderSystem::RemoveShadows ( Scene _scene)

Remove shadows from a scene.

Parameters
[in]_sceneThe scene to remove shadows from.
void gazebo::rendering::RTShaderSystem::SetPerPixelLighting ( bool  _set)

Set the lighting model to per pixel or per vertex.

Parameters
[in]_setTrue means to use per-pixel shaders.
void gazebo::rendering::RTShaderSystem::UpdateShaders ( )

Update the shaders. This should not be called frequently.


The documentation for this class was generated from the following file: