Ogre2.x implementation of the render target class. More...
#include <Ogre2RenderTarget.hh>
Public Member Functions | |
virtual | ~Ogre2RenderTarget () |
Destructor. | |
virtual unsigned int | AntiAliasing () const |
Get the anti-aliasing level. | |
virtual math::Color | BackgroundColor () const override |
Get the background color of the render target. This should be the same as the scene background color. | |
virtual MaterialPtr | BackgroundMaterial () const |
Get the background material of this camera. | |
virtual Ogre::Camera * | Camera () const |
Get a pointer to the internal ogre camera. | |
virtual void | Copy (Image &_image) const override |
Copy the render target buffer data to an image. | |
virtual void | Destroy () override=0 |
Destroy the render target. | |
unsigned int | GLIdImpl () const |
virtual bool | IsRenderWindow () const |
Returns true if this is a render window. | |
void | MetalIdImpl (void *_textureIdPtr) const |
virtual void | PostRender () override |
Post process this object and any of its children after rendering. | |
void | PrepareForExternalSampling () |
See Camera::PrepareForExternalSampling. | |
virtual void | PreRender () override |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender. | |
virtual void | Render () |
Main render call. | |
virtual Ogre::TextureGpu * | RenderTarget () const =0 |
Get a pointer to the ogre render target containing the results of the render. | |
virtual void | SetAntiAliasing (unsigned int _aa) |
set the anti-aliasing level | |
virtual void | SetBackgroundColor (math::Color _color) |
Set the background color of the render target. | |
virtual void | SetBackgroundMaterial (MaterialPtr _material) |
Set the background material of this camera. | |
virtual void | SetCamera (Ogre::Camera *_camera) |
Set the ogre camera to use for this render target. | |
void | SetMaterial (MaterialPtr _material) |
Set a material to render on every object. This method is used for special cases like the render target of a depth camera. | |
void | SetShadowsNodeDefDirty () |
virtual void | SetVisibilityMask (uint32_t _mask) |
Set visibility mask for the viewport associated with this render target. | |
virtual uint32_t | VisibilityMask () const |
Get visibility mask for the viewport associated with this render target. | |
Public Member Functions inherited from BaseRenderTarget< Ogre2Object > | |
BaseRenderTarget () | |
virtual | ~BaseRenderTarget () |
virtual void | AddRenderPass (const RenderPassPtr &_pass) override |
Add a render pass to the render target. | |
virtual PixelFormat | Format () const override |
Set the render target image format. | |
virtual unsigned int | Height () const override |
Get render target height in pixels. | |
virtual void | PreRender (const CameraPtr &_camera) override |
See Object::PreRender. This function will call Object::PreRender but with the added bonus that it has access to the camera that is about to render. | |
virtual bool | Reinterpretable () const override |
See SetFormat() | |
void | RemoveAllRenderPasses () override |
Remove all render passes from the render target. | |
virtual void | RemoveRenderPass (const RenderPassPtr &_pass) override |
Remove a render pass from the render target. | |
virtual RenderPassPtr | RenderPassByIndex (unsigned int _index) const override |
Get a render pass by index. | |
virtual unsigned int | RenderPassCount () const override |
Get the number of render passes applied to the render target. | |
virtual void | SetFormat (PixelFormat _format, bool _reinterpretable=false) override |
Set the render target image format. | |
virtual void | SetHeight (const unsigned int _height) override |
Set the render target height in pixels. | |
virtual void | SetWidth (const unsigned int _width) override |
Set the render target width in pixels. | |
virtual unsigned int | Width () const override |
Get render target width in pixels. | |
Public Member Functions inherited from RenderTarget | |
virtual | ~RenderTarget () |
Destructor. | |
virtual void | PreRender ()=0 |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender. | |
Public Member Functions inherited from Object | |
virtual | ~Object () |
Destructor. | |
virtual unsigned int | Id () const =0 |
Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. | |
virtual std::string | Name () const =0 |
Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. | |
virtual ScenePtr | Scene () const =0 |
Get the Scene that created this object. | |
Public Member Functions inherited from Ogre2Object | |
virtual | ~Ogre2Object () |
Destructor. | |
virtual ScenePtr | Scene () const override |
Public Member Functions inherited from BaseObject | |
virtual | ~BaseObject () |
virtual unsigned int | Id () const override |
virtual std::string | Name () const override |
Static Public Member Functions | |
static uint8_t | TargetFSAA (uint8_t _fsaa) |
Returns the FSAA to use based on supported specs by HW and value specified in _fsaa. | |
static void | UpdateRenderPassChain (Ogre::CompositorWorkspace *_workspace, const std::string &_workspaceDefName, const std::string &_baseNode, const std::string &_finalNode, const std::vector< RenderPassPtr > &_renderPasses, bool _recreateNodes, Ogre::TextureGpu *(*_ogreTextures)[2], bool _isRenderWindow) |
Update the render pass chain. | |
Protected Member Functions | |
Ogre2RenderTarget () | |
Constructor. | |
virtual void | BuildCompositor () |
Build the compositor. | |
void | BuildTargetImpl () |
Build the render texture. | |
virtual void | DestroyCompositor () |
Destroy the compositor. | |
void | DestroyTargetImpl () |
Destroy the render texture. | |
virtual void | RebuildCompositor () |
Rebuild the compositor. | |
virtual void | RebuildImpl () override |
Implementation of the Rebuild function. | |
void | RebuildMaterial () |
Re-initializes render target material to apply a material to everything in the scene. Does nothing if no material has been set. | |
virtual void | RebuildTarget ()=0 |
Rebuild the render target. | |
Ogre::TextureGpu * | RenderTargetImpl () const |
Get a pointer to the ogre render target containing the results of the render (implemented separately to avoid breaking ABI of the pure virtual function) | |
uint8_t | TargetFSAA () const |
Returns the FSAA to use based on supported specs by HW and value specified in Ogre2RenderTarget::AntiAliasing. | |
virtual void | UpdateBackgroundColor () |
Update the background color. | |
virtual void | UpdateBackgroundMaterial () |
Update the background material. | |
virtual void | UpdateRenderPassChain () |
Update the render pass chain. | |
Protected Member Functions inherited from BaseRenderTarget< Ogre2Object > | |
virtual void | Rebuild () |
Protected Member Functions inherited from Ogre2Object | |
Ogre2Object () | |
Constructor. | |
Protected Member Functions inherited from BaseObject | |
BaseObject () | |
virtual void | Init () |
virtual void | Load () |
Protected Attributes | |
unsigned int | antiAliasing = 4 |
Anti-aliasing level. | |
MaterialPtr | backgroundMaterial |
Background material of the render target. | |
bool | backgroundMaterialDirty = false |
Flag to indicate if the render target background material has changed. | |
bool | colorDirty = true |
Flag to indicate if the render target color has changed. | |
MaterialPtr | material |
a material used by for the render target | |
Ogre2RenderTargetMaterialPtr | materialApplicator |
Helper class that applies the material to the render target. | |
Ogre::ColourValue | ogreBackgroundColor |
Stores the background color of the render target. | |
Ogre::Camera * | ogreCamera = nullptr |
Pointer to the internal ogre camera. | |
Ogre::CompositorWorkspace * | ogreCompositorWorkspace = nullptr |
Ogre's compositor workspace - the main interface to render into a render target or render texture. | |
std::string | ogreCompositorWorkspaceDefName |
Ogre's compositor workspace definition name. | |
uint32_t | visibilityMask = GZ_VISIBILITY_ALL |
visibility mask associated with this render target | |
Protected Attributes inherited from BaseRenderTarget< Ogre2Object > | |
PixelFormat | format |
unsigned int | height |
bool | reinterpretable |
bool | renderPassDirty |
Flag to indicate if render pass need to be rebuilt. | |
std::vector< RenderPassPtr > | renderPasses |
A chain of render passes applied to the render target. | |
bool | targetDirty |
unsigned int | width |
Protected Attributes inherited from Ogre2Object | |
Ogre2ScenePtr | scene |
Pointer to the ogre scene. | |
Protected Attributes inherited from BaseObject | |
unsigned int | id |
std::string | name |
Detailed Description
Ogre2.x implementation of the render target class.
Constructor & Destructor Documentation
◆ Ogre2RenderTarget()
|
protected |
Constructor.
◆ ~Ogre2RenderTarget()
|
virtual |
Destructor.
Member Function Documentation
◆ AntiAliasing()
|
virtual |
Get the anti-aliasing level.
◆ BackgroundColor()
|
overridevirtual |
Get the background color of the render target. This should be the same as the scene background color.
- Returns
- Render target background color.
Reimplemented from BaseRenderTarget< Ogre2Object >.
◆ BackgroundMaterial()
|
virtual |
Get the background material of this camera.
- Returns
- background material
◆ BuildCompositor()
|
protectedvirtual |
Build the compositor.
◆ BuildTargetImpl()
|
protected |
Build the render texture.
◆ Camera()
|
virtual |
Get a pointer to the internal ogre camera.
- Returns
- Pointer to ogre camera
◆ Copy()
|
overridevirtual |
Copy the render target buffer data to an image.
- Parameters
-
[in] _image Image to copy the data to
Implements RenderTarget.
◆ Destroy()
|
overridepure virtual |
Destroy the render target.
Implements Object.
Implemented in Ogre2RenderTexture, and Ogre2RenderWindow.
◆ DestroyCompositor()
|
protectedvirtual |
Destroy the compositor.
◆ DestroyTargetImpl()
|
protected |
Destroy the render texture.
◆ GLIdImpl()
unsigned int GLIdImpl | ( | ) | const |
◆ IsRenderWindow()
|
virtual |
Returns true if this is a render window.
- Returns
- True if this render target is a render window
Reimplemented in Ogre2RenderWindow.
◆ MetalIdImpl()
void MetalIdImpl | ( | void * | _textureIdPtr | ) | const |
◆ PostRender()
|
overridevirtual |
Post process this object and any of its children after rendering.
Reimplemented from BaseRenderTarget< Ogre2Object >.
Reimplemented in Ogre2RenderTexture.
◆ PrepareForExternalSampling()
void PrepareForExternalSampling | ( | ) |
◆ PreRender()
|
overridevirtual |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender.
Reimplemented from BaseRenderTarget< Ogre2Object >.
Reimplemented in Ogre2RenderTexture.
◆ RebuildCompositor()
|
protectedvirtual |
Rebuild the compositor.
◆ RebuildImpl()
|
overrideprotectedvirtual |
Implementation of the Rebuild function.
Implements BaseRenderTarget< Ogre2Object >.
◆ RebuildMaterial()
|
protected |
Re-initializes render target material to apply a material to everything in the scene. Does nothing if no material has been set.
◆ RebuildTarget()
|
protectedpure virtual |
Rebuild the render target.
Implemented in Ogre2RenderTexture, and Ogre2RenderWindow.
◆ Render()
|
virtual |
Main render call.
◆ RenderTarget()
|
pure virtual |
Get a pointer to the ogre render target containing the results of the render.
Implemented in Ogre2RenderTexture, and Ogre2RenderWindow.
◆ RenderTargetImpl()
|
protected |
Get a pointer to the ogre render target containing the results of the render (implemented separately to avoid breaking ABI of the pure virtual function)
◆ SetAntiAliasing()
|
virtual |
set the anti-aliasing level
- Parameters
-
[in] _aa Anti-aliasing level
◆ SetBackgroundColor()
|
virtual |
Set the background color of the render target.
- Parameters
-
[in] _color Color to set the background to
◆ SetBackgroundMaterial()
|
virtual |
Set the background material of this camera.
- Parameters
-
[in] _material Material to set the background to
◆ SetCamera()
|
virtual |
Set the ogre camera to use for this render target.
- Parameters
-
[in] _camera Pointer to ogre camera
◆ SetMaterial()
void SetMaterial | ( | MaterialPtr | _material | ) |
Set a material to render on every object. This method is used for special cases like the render target of a depth camera.
- Parameters
-
[in] _material The material to render
◆ SetShadowsNodeDefDirty()
void SetShadowsNodeDefDirty | ( | ) |
- See also
- Camera::SetShadowsNodeDefDirty
◆ SetVisibilityMask()
|
virtual |
Set visibility mask for the viewport associated with this render target.
- Parameters
-
[in] _mask Visibility mask
◆ TargetFSAA() [1/2]
|
protected |
Returns the FSAA to use based on supported specs by HW and value specified in Ogre2RenderTarget::AntiAliasing.
- Returns
- Value in range [1; 256). 1 means no antialiasing.
◆ TargetFSAA() [2/2]
|
static |
Returns the FSAA to use based on supported specs by HW and value specified in _fsaa.
- Parameters
-
[in] _fsaa Value in range [1; 256). 1 means no antialiasing.
- Returns
- Value in range [1; 256). 1 means no antialiasing.
◆ UpdateBackgroundColor()
|
protectedvirtual |
Update the background color.
◆ UpdateBackgroundMaterial()
|
protectedvirtual |
Update the background material.
◆ UpdateRenderPassChain() [1/2]
|
protectedvirtual |
Update the render pass chain.
◆ UpdateRenderPassChain() [2/2]
|
static |
Update the render pass chain.
◆ VisibilityMask()
|
virtual |
Get visibility mask for the viewport associated with this render target.
- Returns
- Visibility mask
Member Data Documentation
◆ antiAliasing
|
protected |
Anti-aliasing level.
◆ backgroundMaterial
|
protected |
Background material of the render target.
◆ backgroundMaterialDirty
|
protected |
Flag to indicate if the render target background material has changed.
◆ colorDirty
|
protected |
Flag to indicate if the render target color has changed.
◆ material
|
protected |
a material used by for the render target
◆ materialApplicator
|
protected |
Helper class that applies the material to the render target.
◆ ogreBackgroundColor
|
protected |
Stores the background color of the render target.
◆ ogreCamera
|
protected |
Pointer to the internal ogre camera.
◆ ogreCompositorWorkspace
|
protected |
Ogre's compositor workspace - the main interface to render into a render target or render texture.
◆ ogreCompositorWorkspaceDefName
|
protected |
Ogre's compositor workspace definition name.
◆ visibilityMask
|
protected |
visibility mask associated with this render target
The documentation for this class was generated from the following file: