Wasabi
Public Member Functions | Public Attributes | List of all members
W_INPUT_LAYOUT Struct Reference

#include <WEffect.hpp>

Public Member Functions

 W_INPUT_LAYOUT (std::vector< W_SHADER_VARIABLE_INFO > a, W_VERTEX_INPUT_RATE r=W_INPUT_RATE_PER_VERTEX)
 
size_t GetSize () const
 

Public Attributes

std::vector< W_SHADER_VARIABLE_INFOattributes
 
W_VERTEX_INPUT_RATE input_rate
 
size_t _size
 

Detailed Description

Description of an input layout for a shader. An input layout describes how a vertex buffer should look like to be compatible with a shader. A vertex buffer bound to the pipeline has to have the same layout as described by the attributes per instance or per vertex, depending on the rate specified.

Member Function Documentation

◆ GetSize()

size_t W_INPUT_LAYOUT::GetSize ( ) const

Retrieves the size (or stride), in bytes, of this input layout. The size is calculated as the sum of the sizes of the attributes.

Returns
The size (or stride), in bytes, of this input layout

Member Data Documentation

◆ _size

size_t W_INPUT_LAYOUT::_size
mutable

Cached size of the input layout

◆ attributes

std::vector<W_SHADER_VARIABLE_INFO> W_INPUT_LAYOUT::attributes

Attributes of a single "vertex" (or instance, depending on input_rate)

◆ input_rate

W_VERTEX_INPUT_RATE W_INPUT_LAYOUT::input_rate

Rate at which memory is read from the vertex buffer to use as attributes


The documentation for this struct was generated from the following file: