#include <BaseRenderTarget.hh>
Public Member Functions | |
BaseRenderTarget () | |
virtual | ~BaseRenderTarget () |
virtual void | AddRenderPass (const RenderPassPtr &_pass) override |
Add a render pass to the render target. | |
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 PixelFormat | Format () const override |
Set the render target image format. | |
virtual unsigned int | Height () const override |
Get render target height in pixels. | |
virtual void | PostRender () override |
Post process this object and any of its children after rendering. | |
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 | 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 | Copy (Image &_image) const =0 |
Write rendered image to given Image. The RenderTarget will convert the underlying image to the specified format listed in the given Image. However if the given image is not of the correct size no work will be done. Calling this function before an image has been rendered will result in undefined behavior. | |
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 void | Destroy ()=0 |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. | |
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. | |
Protected Member Functions | |
virtual void | Rebuild () |
virtual void | RebuildImpl ()=0 |
Protected Attributes | |
PixelFormat | format = PF_UNKNOWN |
unsigned int | height = 0u |
bool | reinterpretable = false |
bool | renderPassDirty = false |
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 = true |
unsigned int | width = 0u |
Constructor & Destructor Documentation
◆ BaseRenderTarget()
BaseRenderTarget | ( | ) |
◆ ~BaseRenderTarget()
|
virtual |
Member Function Documentation
◆ AddRenderPass()
|
overridevirtual |
Add a render pass to the render target.
- Parameters
-
[in] _pass New render pass to add
Implements RenderTarget.
Reimplemented in Ogre2RenderTexture.
◆ 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.
Implements RenderTarget.
Reimplemented in OgreRenderTarget, and Ogre2RenderTarget.
References Scene::BackgroundColor().
◆ Format()
|
overridevirtual |
◆ Height()
|
overridevirtual |
Get render target height in pixels.
- Returns
- The Render target height in pixels
Implements RenderTarget.
◆ PostRender()
|
overridevirtual |
Post process this object and any of its children after rendering.
Implements Object.
Reimplemented in OgreRenderTarget, OgreRenderTexture, Ogre2RenderTarget, and Ogre2RenderTexture.
◆ PreRender() [1/2]
|
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.
Implements Object.
Reimplemented in OgreRenderTarget, OgreRenderTexture, Ogre2RenderTarget, and Ogre2RenderTexture.
◆ PreRender() [2/2]
|
overridevirtual |
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.
- Parameters
-
[in] _camera Camera that is about to render
Implements RenderTarget.
◆ Rebuild()
|
protectedvirtual |
◆ RebuildImpl()
|
protectedpure virtual |
Implemented in OgreRenderTarget, and Ogre2RenderTarget.
◆ Reinterpretable()
|
overridevirtual |
◆ RemoveAllRenderPasses()
|
overridevirtual |
Remove all render passes from the render target.
Implements RenderTarget.
Reimplemented in Ogre2RenderTexture.
◆ RemoveRenderPass()
|
overridevirtual |
Remove a render pass from the render target.
- Parameters
-
[in] _pass render pass to remove
Implements RenderTarget.
Reimplemented in Ogre2RenderTexture.
References std::find().
◆ RenderPassByIndex()
|
overridevirtual |
Get a render pass by index.
- Returns
- Render pass at the specified index
Implements RenderTarget.
References std::endl(), and gzerr.
◆ RenderPassCount()
|
overridevirtual |
Get the number of render passes applied to the render target.
- Returns
- Number of render passes applied
Implements RenderTarget.
◆ SetFormat()
|
overridevirtual |
Set the render target image format.
- Parameters
-
[in] _format New target format [in] _reinterpretable whether the RenderTarget will be reinterpreted to another format (e.g. from RGBA8_UNORM to/from RGBA8_UNORM_SRGB)
Implements RenderTarget.
References PixelUtil::Sanitize().
◆ SetHeight()
|
overridevirtual |
Set the render target height in pixels.
- Parameters
-
[in] _height New render target height in pixels
Implements RenderTarget.
◆ SetWidth()
|
overridevirtual |
Set the render target width in pixels.
- Parameters
-
[in] _width New render target width in pixels
Implements RenderTarget.
◆ Width()
|
overridevirtual |
Get render target width in pixels.
- Returns
- The render target width in pixels
Implements RenderTarget.
Member Data Documentation
◆ format
|
protected |
◆ height
|
protected |
◆ reinterpretable
|
protected |
◆ renderPassDirty
|
protected |
Flag to indicate if render pass need to be rebuilt.
◆ renderPasses
|
protected |
A chain of render passes applied to the render target.
◆ targetDirty
|
protected |
◆ width
|
protected |
The documentation for this class was generated from the following file: