#include <colordepthrendertarget.h>
Public Member Functions | |
| ColorDepthRenderTarget (Core &core) | |
| ~ColorDepthRenderTarget () | |
| virtual bool | init (utility::ErrorState &errorState) override |
| virtual void | beginRendering () override |
| virtual void | endRendering () override |
| virtual const glm::ivec2 | getBufferSize () const override |
| virtual void | setClearColor (const RGBAColorFloat &color) override |
| virtual const RGBAColorFloat & | getClearColor () const override |
| virtual ECullWindingOrder | getWindingOrder () const override |
| virtual VkRenderPass | getRenderPass () const override |
| RenderTexture2D & | getColorTexture () |
| DepthRenderTexture2D & | getDepthTexture () |
| virtual VkFormat | getColorFormat () const override |
| virtual VkFormat | getDepthFormat () const override |
| virtual VkSampleCountFlagBits | getSampleCount () const override |
| virtual bool | getSampleShadingEnabled () const override |
| virtual VkImageLayout | getFinalLayout () const override |
Public Member Functions inherited from Resource | |
| Resource () | |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual void | onDestroy () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Public Attributes | |
| bool | mSampleShading = true |
| Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost. More... | |
| RGBAColorFloat | mClearColor = { 0.0f, 0.0f, 0.0f, 0.0f } |
| Property: 'ClearColor' value used for clearing the color attachment. More... | |
| float | mClearDepth = 1.0f |
| Property: 'ClearDepth' value used for clearing the depth attachment. More... | |
| ERasterizationSamples | mRequestedSamples = ERasterizationSamples::One |
| Property: 'Samples' The number of samples used during Rasterization. For better results turn on 'SampleShading'. More... | |
| ResourcePtr< RenderTexture2D > | mColorTexture |
| Property: 'ColorTexture' color texture to render to. More... | |
| ResourcePtr< DepthRenderTexture2D > | mDepthTexture |
| Property: 'DepthTexture' depth texture to render to. More... | |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
This render target renders to both nap::RenderTexture2D and nap::DepthRenderTexture2D. This lets you use the depth buffer as a shader resource in a subsequent render operation. Only render to a render target within a headless recording pass, failure to do so will result in undefined behavior. Make sure to call beginRendering() to start the render pass and endRenall off-screen render operations.
| ColorDepthRenderTarget | ( | Core & | core | ) |
Every render target requires a reference to core.
| core | link to a nap core instance |
Destroys allocated render resources
|
overridevirtual |
Starts the render pass. Only start the render pass after a successful call to RenderService::beginHeadlessRecording().
Implements IRenderTarget.
|
overridevirtual |
Ends the render pass. Always call this after beginRendering().
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
| RenderTexture2D& getColorTexture | ( | ) |
|
overridevirtual |
Implements IRenderTarget.
| DepthRenderTexture2D& getDepthTexture | ( | ) |
Returns the depth texture resource if available, asserts if this is not the case. Always make sure hasDepthTexture() returns true before calling this function.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Geometry winding order, defaults to clockwise.
Implements IRenderTarget.
|
overridevirtual |
Initializes the render target, including all the required resources.
| errorState | contains the error if initialization failed. |
Reimplemented from Object.
|
overridevirtual |
Updates the render target clear color.
| color | the new clear color to use. |
Implements IRenderTarget.
| RGBAColorFloat mClearColor = { 0.0f, 0.0f, 0.0f, 0.0f } |
Property: 'ClearColor' value used for clearing the color attachment.
| float mClearDepth = 1.0f |
Property: 'ClearDepth' value used for clearing the depth attachment.
| ResourcePtr<RenderTexture2D> mColorTexture |
Property: 'ColorTexture' color texture to render to.
| ResourcePtr<DepthRenderTexture2D> mDepthTexture |
Property: 'DepthTexture' depth texture to render to.
| ERasterizationSamples mRequestedSamples = ERasterizationSamples::One |
Property: 'Samples' The number of samples used during Rasterization. For better results turn on 'SampleShading'.
| bool mSampleShading = true |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost.