smk::Vertex2D Struct Reference

#include <Vertex.hpp>

The vertex structure suitable for a 2D shader. More...

Description

The vertex structure suitable for a 2D shader.

Definition at line 13 of file Vertex.hpp.

Static Public Member Functions

static void Bind ()
 

Public Attributes

glm::vec2 space_position = {0.f, 0.f}
 
glm::vec2 texture_position = {0.f, 0.f}
 

Member Function Documentation

◆ Bind()

void smk::Vertex2D::Bind ( )
static

Definition at line 12 of file Vertex.cpp.

12 {
13 glEnableVertexAttribArray(0);
14 glVertexAttribPointer(0, sizeof(Vertex::space_position) / sizeof(GL_FLOAT),
15 GL_FLOAT, false, sizeof(Vertex),
16 (void*)offsetof(Vertex, space_position)); // NOLINT
17 glEnableVertexAttribArray(1);
18 glVertexAttribPointer(1, sizeof(Vertex::texture_position) / sizeof(GL_FLOAT),
19 GL_FLOAT, false, sizeof(Vertex),
20 (void*)offsetof(Vertex, texture_position)); // NOLINT
21}

Member Data Documentation

◆ space_position

glm::vec2 smk::Vertex2D::space_position = {0.f, 0.f}

Definition at line 14 of file Vertex.hpp.

◆ texture_position

glm::vec2 smk::Vertex2D::texture_position = {0.f, 0.f}

Definition at line 15 of file Vertex.hpp.


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