diff --git a/src/render/gl2shader.h b/src/render/gl2shader.h index 5ae71e3..94c476f 100644 --- a/src/render/gl2shader.h +++ b/src/render/gl2shader.h @@ -25,6 +25,10 @@ namespace SolveSpace { +//----------------------------------------------------------------------------- +// Floating-point data structures; the layout of these must match shaders +//----------------------------------------------------------------------------- + class Vector2f { public: float x, y; @@ -45,7 +49,7 @@ public: class Vector4f { public: - float w, x, y, z; + float x, y, z, w; static Vector4f From(float x, float y, float z, float w); static Vector4f From(const Vector &v, float w); @@ -53,6 +57,10 @@ public: static Vector4f From(const RgbaColor &c); }; +//----------------------------------------------------------------------------- +// Wrappers for our shaders +//----------------------------------------------------------------------------- + class Shader { public: GLuint program;