30 lines
656 B
C
30 lines
656 B
C
|
|
#ifndef SPECTRE_GRAPHICS_VERTEX2D_H
|
|
#define SPECTRE_GRAPHICS_VERTEX2D_H
|
|
|
|
#include <Spectre/Math/Vector2.h>
|
|
#include <Spectre/Math/Vector3.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;
|
|
Vector3f color;
|
|
Vector2f uv;
|
|
|
|
Vertex2D();
|
|
Vertex2D(Vector2f pos);
|
|
Vertex2D(Vector2f pos, Vector2f uv);
|
|
Vertex2D(Vector2f pos, Vector3f color, Vector2f uv = 0.0f);
|
|
};
|
|
|
|
#endif /* SPECTRE_GRAPHICS_VERTEX2D_H */
|