Antkeeper  0.0.1
Public Attributes | List of all members
gl::vertex_attribute Struct Reference

Describes a vertex attribute within a vertex buffer. More...

#include <vertex-attribute.hpp>

Public Attributes

const vertex_bufferbuffer {nullptr}
 Pointer to the vertex buffer containing vertex attribute data. More...
 
std::size_t offset {0}
 Offset to the first component of the first instance of this attribute in the vertex buffer, in bytes. More...
 
std::size_t stride {0}
 Number of bytes between consecutive instances of this attribute in the vertex buffer. A value of 0 indicates attribute instances are tightly packed. More...
 
vertex_attribute_type type {0}
 Data type of each component in the attribute. More...
 
std::uint8_t components {0}
 Number of components per attribute instance. Supported values are 1, 2, 3, and 4. More...
 
bool normalized {}
 true if fixed point data should be normalized, false otherwise. More...
 

Detailed Description

Describes a vertex attribute within a vertex buffer.

See also
gl::vertex_buffer
gl::vertex_array

Definition at line 49 of file gl/vertex-attribute.hpp.

Member Data Documentation

◆ buffer

const vertex_buffer* gl::vertex_attribute::buffer {nullptr}

Pointer to the vertex buffer containing vertex attribute data.

Definition at line 52 of file gl/vertex-attribute.hpp.

◆ components

std::uint8_t gl::vertex_attribute::components {0}

Number of components per attribute instance. Supported values are 1, 2, 3, and 4.

Definition at line 64 of file gl/vertex-attribute.hpp.

◆ normalized

bool gl::vertex_attribute::normalized {}

true if fixed point data should be normalized, false otherwise.

Definition at line 67 of file gl/vertex-attribute.hpp.

◆ offset

std::size_t gl::vertex_attribute::offset {0}

Offset to the first component of the first instance of this attribute in the vertex buffer, in bytes.

Definition at line 55 of file gl/vertex-attribute.hpp.

◆ stride

std::size_t gl::vertex_attribute::stride {0}

Number of bytes between consecutive instances of this attribute in the vertex buffer. A value of 0 indicates attribute instances are tightly packed.

Definition at line 58 of file gl/vertex-attribute.hpp.

◆ type

vertex_attribute_type gl::vertex_attribute::type {0}

Data type of each component in the attribute.

Definition at line 61 of file gl/vertex-attribute.hpp.


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