Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
rendering_engine::Vertex2D Struct Reference

Vertex format for 2D UI/Overlay elements. More...

#include <vertex_declarations.hpp>

Public Member Functions

 Vertex2D ()=default
 Default constructor.
 Vertex2D (const glm::vec2 &pos, const glm::vec4 &col, const glm::vec2 &uv)
 Construct with position, color, and texture coordinates.

Public Attributes

glm::vec2 position
 2D position in screen or world space
glm::vec4 color
 Vertex color (RGBA)
glm::vec2 textureCoordinates
 UV coordinates for texturing.

Detailed Description

Vertex format for 2D UI/Overlay elements.

Used for sprites, UI widgets, etc.

Definition at line 45 of file vertex_declarations.hpp.

Constructor & Destructor Documentation

◆ Vertex2D() [1/2]

rendering_engine::Vertex2D::Vertex2D ( )
default

Default constructor.

◆ Vertex2D() [2/2]

rendering_engine::Vertex2D::Vertex2D ( const glm::vec2 & pos,
const glm::vec4 & col,
const glm::vec2 & uv )
inline

Construct with position, color, and texture coordinates.

Parameters
pos2D position
colRGBA color
uvTexture coordinates

Definition at line 60 of file vertex_declarations.hpp.

63 :
64 position(pos),
65 color(col),
67 {}
glm::vec4 color
Vertex color (RGBA)
glm::vec2 position
2D position in screen or world space
glm::vec2 textureCoordinates
UV coordinates for texturing.

Member Data Documentation

◆ color

glm::vec4 rendering_engine::Vertex2D::color

Vertex color (RGBA)

Definition at line 48 of file vertex_declarations.hpp.

◆ position

glm::vec2 rendering_engine::Vertex2D::position

2D position in screen or world space

Definition at line 47 of file vertex_declarations.hpp.

◆ textureCoordinates

glm::vec2 rendering_engine::Vertex2D::textureCoordinates

UV coordinates for texturing.

Definition at line 49 of file vertex_declarations.hpp.


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