1
0
Fork 0
spectre/include/Spectre/Graphics/Vertex2D.h
Henrik Hautakoski e10daeaaa6
Move everything from global namespace to "sp" namespace
When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine.

So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
2019-09-30 19:10:17 +02:00

34 lines
693 B
C++

#ifndef SPECTRE_GRAPHICS_VERTEX2D_H
#define SPECTRE_GRAPHICS_VERTEX2D_H
#include <Spectre/Math/Vector2.h>
#include <Spectre/Math/Vector4.h>
namespace sp {
// 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);
};
} // namespace sp
#endif /* SPECTRE_GRAPHICS_VERTEX2D_H */