#include <snapshotrendertarget.h>
Public Member Functions | |
SnapshotRenderTarget (Core &core) | |
~SnapshotRenderTarget () | |
bool | init (Snapshot *snapshot, utility::ErrorState &errorState) |
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 |
virtual VkFormat | getColorFormat () const override |
virtual VkFormat | getDepthFormat () const override |
virtual VkSampleCountFlagBits | getSampleCount () const override |
virtual bool | getSampleShadingEnabled () const override |
void | setCellIndex (uint32_t cellIndex) |
Special version of RenderTarget made to work exclusively in conjunction with Snapshot. Renders to multiple VkFramebuffers in a sequence to reduce the memory consumption of an otherwise large Texture2D. This makes a huge difference when MSAA samples > 1 is configured as fewer additional image resources may be allocated when multiple samples are used.
SnapshotRenderTarget | ( | Core & | core | ) |
Every render target requires a reference to core.
core | link to a nap core instance |
~SnapshotRenderTarget | ( | ) |
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.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Geometry winding order, defaults to clockwise.
Implements IRenderTarget.
bool init | ( | Snapshot * | snapshot, |
utility::ErrorState & | errorState | ||
) |
Initializes the render target, including all the required resources.
snapshot | pointer to a snapshot object |
errorState | contains the error if initialization failed. |
void setCellIndex | ( | uint32_t | cellIndex | ) |
cellIndex | change the index of the cell to setup for rendering |
|
overridevirtual |
Updates the render target clear color.
color | the new clear color to use. |
Implements IRenderTarget.