Skip to content

Engine → Renderer → render_target.h

render_target

Syntax

class CONJURE_API render_target

Constructors

AccessSignatureDescription
publicrender_target();

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
public~render_target();

Variables

AccessNameTypeDefaultDescription
privatemImplstd::unique_ptr<impl>{}

Functions

Public

colour_texture

[[nodiscard]] gpu_texture_id colour_texture() const noexcept;

The colour texture registered with the renderer's texture table, so the editor can bind it through imgui_renderer::register_texture. The id stays the same across renderer::resize_render_target and then resolves to the new texture, so a registered ImGui handle or a sprite holding it keeps showing the target. ImGui shows every colour format right; a sprite shows an RGBA8_SRGB, BGRA8_SRGB or float target right but an RGBA8_UNORM one too light, because that target holds display values a sprite samples as linear (render_target_desc::colourFormat).

desc

[[nodiscard]] const render_target_desc &desc() const noexcept;

The description as created or last resized.

frames_rendered

[[nodiscard]] u64 frames_rendered() const noexcept;

Number of frames rendered into this target since creation or the last resize.

has_depth

[[nodiscard]] bool has_depth() const noexcept;

True when the target was created with render_target_desc::withDepth and so keeps the scene depth of the first view of each frame that renders into it (renderer::read_back_depth).

size

[[nodiscard]] math::uvec2 size() const noexcept;

Current size in pixels.