RAMSES Documentation  27.0.130
Information for RAMSES users and developers
RenderPass.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2015 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_RENDERPASS_H
10 #define RAMSES_RENDERPASS_H
11 
13 
14 namespace ramses
15 {
16  class Camera;
17  class RenderGroup;
18  class RenderTarget;
19 
31  {
32  public:
39  status_t setCamera(const Camera& camera);
40 
45  const Camera* getCamera() const;
46 
51 
63  status_t addRenderGroup(const RenderGroup& renderGroup, int32_t orderWithinPass = 0);
64 
72  status_t removeRenderGroup(const RenderGroup& renderGroup);
73 
80  bool containsRenderGroup(const RenderGroup& renderGroup) const;
81 
90  status_t getRenderGroupOrder(const RenderGroup& renderGroup, int32_t& orderWithinPass) const;
91 
99 
108 
115 
128  status_t setRenderOrder(int32_t renderOrder);
129 
135  int32_t getRenderOrder() const;
136 
146  status_t setClearColor(float r, float g, float b, float a);
147 
153  void getClearColor(float &r, float &g, float &b, float &a) const;
154 
164  status_t setClearFlags(uint32_t clearFlags);
165 
171  uint32_t getClearFlags() const;
172 
180  status_t setEnabled(bool enable);
181 
187  bool isEnabled() const;
188 
207  status_t setRenderOnce(bool enable);
208 
214  bool isRenderOnce() const;
215 
229 
233  class RenderPassImpl& impl;
234 
235  protected:
239  friend class SceneImpl;
240 
246  explicit RenderPass(RenderPassImpl& pimpl);
247 
251  virtual ~RenderPass();
252  };
253 }
254 
255 #endif
#define RAMSES_API
Definition: APIExport.h:35
The Camera base class is part of a scene and defines a view into the scene defined by the client appl...
Definition: Camera.h:26
The RenderGroup is a container used to collect renderables which are supposed to be rendered together...
Definition: RenderGroup.h:31
The RenderPass is a container used to collect meshes which are supposed to be rendered together.
Definition: RenderPass.h:31
bool containsRenderGroup(const RenderGroup &renderGroup) const
Checks whether a RenderGroup is part of the RenderPass.
status_t setCamera(const Camera &camera)
Set the camera to use for rendering the objects of this renderpass.
status_t setClearFlags(uint32_t clearFlags)
Set the clear flags which enable/disable the clearing of the render target assigned to this RenderPas...
status_t retriggerRenderOnce()
Will re-render a render once pass.
status_t setRenderTarget(RenderTarget *renderTarget)
Set the render target for the render pass to render into.
virtual ~RenderPass()
Destructor of the RenderPass.
RenderPass(RenderPassImpl &pimpl)
Constructor for RenderPass.
Camera * getCamera()
int32_t getRenderOrder() const
Get the render order of this render pass.
status_t addRenderGroup(const RenderGroup &renderGroup, int32_t orderWithinPass=0)
Add a RenderGroup to this RenderPass for rendering.
void getClearColor(float &r, float &g, float &b, float &a) const
Returns the clear color of the RenderPass.
bool isRenderOnce() const
Get the render once state of the render pass.
status_t removeAllRenderGroups()
Will make the RenderPass empty.
const Camera * getCamera() const
status_t setRenderOnce(bool enable)
Set/unset render once flag - rendering of the render pass only once.
class RenderPassImpl & impl
Definition: RenderPass.h:233
bool isEnabled() const
Get the enable state of the render pass.
status_t setRenderOrder(int32_t renderOrder)
Set the render order for the render pass.
status_t removeRenderGroup(const RenderGroup &renderGroup)
Remove a RenderGroup from this RenderPass.
status_t setClearColor(float r, float g, float b, float a)
Set the clear color for the RenderPass (default: [0,0,0,0])
const RenderTarget * getRenderTarget() const
Get the render target of this render pass.
uint32_t getClearFlags() const
Returns the clear flags of the RenderPass.
status_t setEnabled(bool enable)
Enable/Disable render pass.
status_t getRenderGroupOrder(const RenderGroup &renderGroup, int32_t &orderWithinPass) const
Gets a render order of given RenderGroup within this RenderPass.
The RenderTarget can be used as an output for a RenderPass.
Definition: RenderTarget.h:20
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26