❖
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
6
namespace
eng
7
{
8
struct
VertexElement
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
21
struct
VertexLayout
22
{
23
std::vector<VertexElement>
elements
;
24
uint32_t
stride
= 0;
// Total size of a single vertex
25
};
26
}
GLuint
unsigned int GLuint
Definition
GLForward.h:11
eng
Definition
Application.cpp:4
eng::VertexElement
Definition
VertexLayout.h:9
eng::VertexElement::NormalIndex
static constexpr int NormalIndex
Definition
VertexLayout.h:18
eng::VertexElement::size
GLuint size
Definition
VertexLayout.h:11
eng::VertexElement::ColorIndex
static constexpr int ColorIndex
Definition
VertexLayout.h:16
eng::VertexElement::offset
uint32_t offset
Definition
VertexLayout.h:13
eng::VertexElement::type
GLuint type
Definition
VertexLayout.h:12
eng::VertexElement::UVIndex
static constexpr int UVIndex
Definition
VertexLayout.h:17
eng::VertexElement::index
GLuint index
Definition
VertexLayout.h:10
eng::VertexElement::PositionIndex
static constexpr int PositionIndex
Definition
VertexLayout.h:15
eng::VertexLayout
Definition
VertexLayout.h:22
eng::VertexLayout::stride
uint32_t stride
Definition
VertexLayout.h:24
eng::VertexLayout::elements
std::vector< VertexElement > elements
Definition
VertexLayout.h:23
docs
GD-Engine-lesson-5-2
engine
source
graphics
VertexLayout.h
Generated by
1.9.8