Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
VertexLayout.h
Go to the documentation of this file.
1#pragma once
2#include <GL/glew.h>
3#include <vector>
4#include <stdint.h>
5
6namespace eng
7{
9 {
10 GLuint index; // Attribute location
11 GLuint size; // Number of components
12 GLuint type; // Data type (e.g. GL_FLOAT)
13 uint32_t offset; // Bytes offset from start of vertex
14
15 static constexpr int PositionIndex = 0;
16 static constexpr int ColorIndex = 1;
17 static constexpr int UVIndex = 2;
18 static constexpr int NormalIndex = 3;
19 };
20
22 {
23 std::vector<VertexElement> elements;
24 uint32_t stride = 0; // Total size of a single vertex
25 };
26}
unsigned int GLuint
Definition GLForward.h:11
static constexpr int NormalIndex
static constexpr int ColorIndex
static constexpr int UVIndex
static constexpr int PositionIndex
std::vector< VertexElement > elements