1
0
Fork 0
spectre/include/Spectre/Graphics/Vertex2D.h

30 lines
658 B
C

#ifndef SPECTRE_GRAPHICS_VERTEX2D_H
#define SPECTRE_GRAPHICS_VERTEX2D_H
#include <Spectre/Math/Vector2.h>
#include <Spectre/Math/Vector4.h>
// Based on https://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/attributes.php
enum VertexAttrib
{
VertexAttribPosition = 0,
VertexAttribColor0 = 3,
VertexAttribColor1 = 4,
VertexAttribTexCoord0 = 8,
};
// Simple POD structure for vertex attributes.
struct Vertex2D
{
Vector2f position;
Vector4f color;
Vector2f uv;
Vertex2D();
Vertex2D(Vector2f pos);
Vertex2D(Vector2f pos, Vector2f uv);
Vertex2D(Vector2f pos, Vector4f color, Vector2f uv = 0.0f);
};
#endif /* SPECTRE_GRAPHICS_VERTEX2D_H */