Topaz 5.0
Topaz Game Engine
Loading...
Searching...
No Matches
tz::ren::quad_renderer_info Struct Reference

Description

Specifies creation flags for a quad renderer.

See create_quad_renderer for usage.

#include "quad.hpp"

Public Attributes

tz::v4f clear_colour = {0.0f, 0.0f, 0.0f, 1.0f}
 When the main pass is executed, the colour target will be cleared to this colour value.
 
std::span< const tz::gpu::resource_handlecolour_targets
 Specifies the colour target to render into. By default, this is the window resource (i.e the quad renderer will draw to the window unless you specify a different colour target).
 
quad_renderer_flag flags = static_cast<quad_renderer_flag>(0)
 Any extra optional flags to specify?
 
std::string_view custom_fragment_shader = {}
 Custom fragment shader. Unless quad_renderer_flag::custom_fragment_shader is specified, this value is ignored and a default fragment shader is used.
 
std::size_t extra_data_per_quad = 0
 How much extraneous GPU memory should be allocated per quad? If you want to store extra data per quad, you should put the size of that data here.
 

Member Data Documentation

◆ clear_colour

tz::v4f tz::ren::quad_renderer_info::clear_colour = {0.0f, 0.0f, 0.0f, 1.0f}

When the main pass is executed, the colour target will be cleared to this colour value.

◆ colour_targets

std::span<const tz::gpu::resource_handle> tz::ren::quad_renderer_info::colour_targets
Initial value:
=
[]()->std::span<const tz::gpu::resource_handle>
{
static tz::gpu::resource_handle default_targets[1];
default_targets[0] = tz::gpu::window_resource;
return {std::begin(default_targets), std::end(default_targets)};
}()
constexpr auto window_resource
Corresponds to either the window image (as a colour target) or the system depth image (as a depth tar...
Definition resource.hpp:127

Specifies the colour target to render into. By default, this is the window resource (i.e the quad renderer will draw to the window unless you specify a different colour target).

◆ flags

quad_renderer_flag tz::ren::quad_renderer_info::flags = static_cast<quad_renderer_flag>(0)

Any extra optional flags to specify?

◆ custom_fragment_shader

std::string_view tz::ren::quad_renderer_info::custom_fragment_shader = {}

Custom fragment shader. Unless quad_renderer_flag::custom_fragment_shader is specified, this value is ignored and a default fragment shader is used.

◆ extra_data_per_quad

std::size_t tz::ren::quad_renderer_info::extra_data_per_quad = 0

How much extraneous GPU memory should be allocated per quad? If you want to store extra data per quad, you should put the size of that data here.