]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexbuilder.h
Additional overloads for creating pipelines
[libs/gl.git] / source / vertexbuilder.h
index 7a1c943c9ed18b7f6f2330cdc67b0ebb76bc4197..49f0dcf5e38c89d69496bd6473b0027dee63ce8f 100644 (file)
@@ -33,6 +33,16 @@ public:
 
        virtual ~VertexBuilder() { }
 
+       void set_matrix(const Matrix &m)
+       { mtx = m; }
+
+       void transform(const Matrix &m)
+       { mtx *= m; }
+
+       const Matrix &get_matrix() const
+       { return mtx.top(); }
+
+       // Deprecated
        MatrixStack &matrix()
        { return mtx; }
 
@@ -45,6 +55,9 @@ public:
        void vertex(float x, float y, float z, float w)
        { vertex(Vector4(x, y, z, w)); }
 
+       void vertex(const Vector3 &v)
+       { vertex(Vector4(v.x, v.y, v.z, 1)); }
+
        void vertex(const Vector4 &v)
        { vertex_(mtx.top()*v); }