Lysa  0.0
Lysa 3D Engine
RenderTarget Class Reference

Detailed Description

Render target for displaying the scene

+ Inheritance diagram for RenderTarget:

Public Member Functions

 RenderTarget (const RenderTargetConfiguration &configuration, vireo::PlatformWindowHandle renderingWindowHandle)
 
 ~RenderTarget () override
 
void render ()
 
auto isPaused () const
 
void setPause (bool pause)
 
float getWidth () const
 
float getHeight () const
 
float getAspectRatio () const
 
uint32 getFramesInFlight () const
 
uint32 getCurrentFrameIndex () const
 
const vireo::Extent & getExtent () const
 
vireo::ImageFormat getImageFormat () const
 
void waitIdle () const
 
void addView (RenderView &view)
 
void updateView (RenderView &view)
 
void removeView (const RenderView &view)
 
void updatePipelines (const std::unordered_map< pipeline_id, std::vector< unique_id >> &pipelineIds) const
 
void resize ()
 
const RendererConfigurationgetRendererConfiguration () const
 
void addRenderer (Vector3DRenderer &vector3DRenderer)
 
RenderergetRenderer () const
 
void setDisplayDebug (const bool display)
 
bool getDisplayDebug () const
 
- Public Member Functions inherited from UniqueResource
 UniqueResource () = default
 
 UniqueResource (UniqueResource &) = delete
 
UniqueResource & operator= (UniqueResource &) = delete
 
- Public Member Functions inherited from UnmanagedResource
 UnmanagedResource ()
 
 UnmanagedResource (const Resource &other)
 
- Public Member Functions inherited from Resource
bool operator== (const Resource &other) const
 
 Resource () = default
 
 Resource (const unique_id id)
 
virtual ~Resource () = default
 

Additional Inherited Members

- Public Attributes inherited from Resource
unique_id id {INVALID_ID}
 

Constructor & Destructor Documentation

RenderTarget ( const RenderTargetConfiguration configuration,
vireo::PlatformWindowHandle  renderingWindowHandle 
)

Creates a RenderTarget

Parameters
configurationThe configuration for the render target
renderingWindowHandleThe handle to the platform window
~RenderTarget ( )
override

Member Function Documentation

void addRenderer ( Vector3DRenderer vector3DRenderer)
inline

Adds a 3D vector renderer

void addView ( RenderView view)

Adds a view to the render target

float getAspectRatio ( ) const
inline

Returns the aspect ratio ((width / height) of the render target

uint32 getCurrentFrameIndex ( ) const
inline

Returns the current frame index

bool getDisplayDebug ( ) const
inline
const vireo::Extent& getExtent ( ) const
inline

Returns the extent of the swap chain

uint32 getFramesInFlight ( ) const
inline

Returns the number of frames in flight

float getHeight ( ) const
inline

Returns the height in pixels of the render target

vireo::ImageFormat getImageFormat ( ) const
inline

Returns the image format of the swap chain

Renderer& getRenderer ( ) const
inline

Returns the scene renderer

const RendererConfiguration& getRendererConfiguration ( ) const
inline

Returns the renderer configuration

float getWidth ( ) const
inline

Returns the width in pixels of the render target

auto isPaused ( ) const
inline

Returns true if the rendering is paused

void removeView ( const RenderView view)

Removes a view from the render target

void render ( )

Renders the scene into the target

void resize ( )

Resizes the render target

void setDisplayDebug ( const bool  display)
inline
void setPause ( bool  pause)

Pauses or resumes the rendering

void updatePipelines ( const std::unordered_map< pipeline_id, std::vector< unique_id >> &  pipelineIds) const

Updates the pipelines

void updateView ( RenderView view)

Updates a view in the render target

void waitIdle ( ) const
inline

Waits for the GPU to finish all work on this target