![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
The RenderPass is a container used to collect meshes which are supposed to be rendered together. More...
#include <RenderPass.h>
Public Member Functions | |
status_t | setCamera (const Camera &camera) |
Set the camera to use for rendering the objects of this renderpass. More... | |
const Camera * | getCamera () const |
Camera * | getCamera () |
status_t | addRenderGroup (const RenderGroup &renderGroup, int32_t orderWithinPass=0) |
Add a RenderGroup to this RenderPass for rendering. More... | |
status_t | removeRenderGroup (const RenderGroup &renderGroup) |
Remove a RenderGroup from this RenderPass. More... | |
bool | containsRenderGroup (const RenderGroup &renderGroup) const |
Checks whether a RenderGroup is part of the RenderPass. More... | |
status_t | getRenderGroupOrder (const RenderGroup &renderGroup, int32_t &orderWithinPass) const |
Gets a render order of given RenderGroup within this RenderPass. More... | |
status_t | removeAllRenderGroups () |
Will make the RenderPass empty. More... | |
status_t | setRenderTarget (RenderTarget *renderTarget) |
Set the render target for the render pass to render into. More... | |
const RenderTarget * | getRenderTarget () const |
Get the render target of this render pass. More... | |
status_t | setRenderOrder (int32_t renderOrder) |
Set the render order for the render pass. More... | |
int32_t | getRenderOrder () const |
Get the render order of this render pass. More... | |
status_t | setClearColor (float r, float g, float b, float a) |
Set the clear color for the RenderPass (default: [0,0,0,0]) More... | |
void | getClearColor (float &r, float &g, float &b, float &a) const |
Returns the clear color of the RenderPass. More... | |
status_t | setClearFlags (uint32_t clearFlags) |
Set the clear flags which enable/disable the clearing of the render target assigned to this RenderPass(default: ramses::EClearFlags_All) More... | |
uint32_t | getClearFlags () const |
Returns the clear flags of the RenderPass. More... | |
status_t | setEnabled (bool enable) |
Enable/Disable render pass. More... | |
bool | isEnabled () const |
Get the enable state of the render pass. More... | |
status_t | setRenderOnce (bool enable) |
Set/unset render once flag - rendering of the render pass only once. More... | |
bool | isRenderOnce () const |
Get the render once state of the render pass. More... | |
status_t | retriggerRenderOnce () |
Will re-render a render once pass. More... | |
![]() | |
sceneObjectId_t | getSceneObjectId () const |
Returns scene object id which is automatically assigned at creation time of object and is unique within scope of one scene. More... | |
sceneId_t | getSceneId () const |
Returns sceneid to which this object belongs to. More... | |
![]() | |
const char * | getName () const |
Returns the name of the object. More... | |
status_t | setName (const char *name) |
Changes the name of the object. More... | |
ERamsesObjectType | getType () const |
Gets type of the object. More... | |
bool | isOfType (ERamsesObjectType type) const |
Checks if the object is of given type. More... | |
![]() | |
status_t | validate () const |
Generates verbose validation of the object. More... | |
const char * | getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const |
Provides verbose report in human readable form generated by validate. More... | |
const char * | getStatusMessage (status_t status) const |
Get the string description for a status provided by a RAMSES API function. More... | |
StatusObject (const StatusObject &other)=delete | |
Deleted copy constructor. More... | |
StatusObject & | operator= (const StatusObject &other)=delete |
Deleted copy assignment. More... | |
Public Attributes | |
class RenderPassImpl & | impl |
![]() | |
class SceneObjectImpl & | impl |
![]() | |
class ClientObjectImpl & | impl |
![]() | |
class RamsesObjectImpl & | impl |
![]() | |
class StatusObjectImpl & | impl |
Protected Member Functions | |
RenderPass (RenderPassImpl &pimpl) | |
Constructor for RenderPass. More... | |
virtual | ~RenderPass () |
Destructor of the RenderPass. More... | |
![]() | |
SceneObject (SceneObjectImpl &pimpl) | |
Constructor for SceneObject. More... | |
virtual | ~SceneObject () |
Destructor of the SceneObject. More... | |
![]() | |
ClientObject (ClientObjectImpl &pimpl) | |
Constructor for ClientObject. More... | |
virtual | ~ClientObject () |
Destructor of the ClientObject. More... | |
![]() | |
RamsesObject (RamsesObjectImpl &pimpl) | |
Constructor for RamsesObject. More... | |
virtual | ~RamsesObject () |
Destructor of the RamsesObject. More... | |
![]() | |
StatusObject (StatusObjectImpl &pimpl) | |
Constructor for StatusObject. More... | |
virtual | ~StatusObject () |
Destructor of the StatusObject. More... | |
Friends | |
class | SceneImpl |
Scene is the factory for creating RenderPass instances. More... | |
The RenderPass is a container used to collect meshes which are supposed to be rendered together.
A RenderPass has a Camera which is used for all MeshNodes rendered in the RenderPass. A MeshNode is rendered only if added to a RenderPass. The RenderPass can optionally have a RenderTarget used to redirect the output of the RenderPass. RenderPass objects are ordered together using a render order, which is also shared with BlitPass objects, i.e, RenderPass and BlitPass objects can all be ordered relative to each other.
|
explicitprotected |
Constructor for RenderPass.
[in] | pimpl | Internal data for implementation specifics of RenderPass (sink - instance becomes owner) |
|
protectedvirtual |
Destructor of the RenderPass.
status_t ramses::RenderPass::addRenderGroup | ( | const RenderGroup & | renderGroup, |
int32_t | orderWithinPass = 0 |
||
) |
Add a RenderGroup to this RenderPass for rendering.
RenderGroup can be added to multiple RenderPass instances but cannot be added multiple times to the same instance.
[in] | renderGroup | The RenderGroup to be added. |
[in] | orderWithinPass | Order within the RenderPass that will be used for rendering. RenderGroup with lower number will be rendered before a RenderGroup with higher number. |
bool ramses::RenderPass::containsRenderGroup | ( | const RenderGroup & | renderGroup | ) | const |
Checks whether a RenderGroup is part of the RenderPass.
[in] | renderGroup | The RenderGroup to look for |
true
if the mesh is used in this RenderPass false
otherwise Camera* ramses::RenderPass::getCamera | ( | ) |
Get the camera of this RenderPass.
const Camera* ramses::RenderPass::getCamera | ( | ) | const |
Get the camera of this RenderPass.
void ramses::RenderPass::getClearColor | ( | float & | r, |
float & | g, | ||
float & | b, | ||
float & | a | ||
) | const |
Returns the clear color of the RenderPass.
[out] | r,g,b,a | color channels of clear color |
uint32_t ramses::RenderPass::getClearFlags | ( | ) | const |
Returns the clear flags of the RenderPass.
status_t ramses::RenderPass::getRenderGroupOrder | ( | const RenderGroup & | renderGroup, |
int32_t & | orderWithinPass | ||
) | const |
Gets a render order of given RenderGroup within this RenderPass.
[in] | renderGroup | The RenderGroup to query order for |
[out] | orderWithinPass | Order of the RenderGroup within this RenderPass |
int32_t ramses::RenderPass::getRenderOrder | ( | ) | const |
Get the render order of this render pass.
const RenderTarget* ramses::RenderPass::getRenderTarget | ( | ) | const |
Get the render target of this render pass.
bool ramses::RenderPass::isEnabled | ( | ) | const |
Get the enable state of the render pass.
bool ramses::RenderPass::isRenderOnce | ( | ) | const |
Get the render once state of the render pass.
status_t ramses::RenderPass::removeAllRenderGroups | ( | ) |
Will make the RenderPass empty.
status_t ramses::RenderPass::removeRenderGroup | ( | const RenderGroup & | renderGroup | ) |
Remove a RenderGroup from this RenderPass.
[in] | renderGroup | The RenderGroup to be removed. |
status_t ramses::RenderPass::retriggerRenderOnce | ( | ) |
Will re-render a render once pass.
If content of the render once pass changes and needs to be rendered once more this method will guarantee the render pass to be rendered once more with the state of the scene flushed together with this command.
Note that Ramses does not track changes of render pass content and will not automatically re-render a render once pass if its content changed.
Set the camera to use for rendering the objects of this renderpass.
camera | The camera to use. |
status_t ramses::RenderPass::setClearColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Set the clear color for the RenderPass (default: [0,0,0,0])
The clear color will be used to clear a render target assigned to this RenderPass if clear flag is enabled, see setClearFlag.
r,g,b,a | color channels of clear color |
status_t ramses::RenderPass::setClearFlags | ( | uint32_t | clearFlags | ) |
Set the clear flags which enable/disable the clearing of the render target assigned to this RenderPass(default: ramses::EClearFlags_All)
The clear flags have no effect on render passes with no render target assigned, i.e. it is not allowed to control clearing of display buffer (whether it is framebuffer or offscreen buffer) on renderer side from within scene's render pass.
clearFlags | clear flags, which is a bitmask of the ramses::EClearFlags enum |
status_t ramses::RenderPass::setEnabled | ( | bool | enable | ) |
Enable/Disable render pass.
enable | The enable flag which indicates if the render pass is rendered (Default:true) |
status_t ramses::RenderPass::setRenderOnce | ( | bool | enable | ) |
Set/unset render once flag - rendering of the render pass only once.
By default render pass is rendered every frame, the render once flag can be used to tell the renderer to render the render pass just once. This can be useful for pre-rendering of heavy content into render targets, etc.
This flag is orthogonal to all the other states of render pass, e.g. render pass is not rendered at all if it is disabled (see setEnabled
) regardless of render once flag set or unset.
When render pass is enabled and render once set it is guaranteed to be rendered at least once (can be more if scene is unmapped/mapped on renderer side).
enable | The flag which indicates if the render pass is to be rendered only once (Default:false) |
status_t ramses::RenderPass::setRenderOrder | ( | int32_t | renderOrder | ) |
Set the render order for the render pass.
This order defines the order in which the render pass is executed relative to other render and blit passes. Render and blit passes with lower render order are executed first. Render and blit passes with same render order might be executed by the renderer in any order.
The default render order is Zero.
renderOrder | Render order used for ordering the render pass |
status_t ramses::RenderPass::setRenderTarget | ( | RenderTarget * | renderTarget | ) |
Set the render target for the render pass to render into.
renderTarget | The render target to render into, set to null for direct framebuffer rendering |
|
friend |
Scene is the factory for creating RenderPass instances.
class RenderPassImpl& ramses::RenderPass::impl |
Stores internal data for implementation specifics of RenderPass.