]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderer.h
Add a new transform API to Renderer.
[libs/gl.git] / source / renderer.h
index 10d1fb3f13c0f2c2f8d9b539a5b90d724d72b506..18d3a41a7bf49dcf19737ce53a01f5a08cfc93e3 100644 (file)
@@ -118,8 +118,18 @@ public:
        times without an intervening end(). */
        void begin(const Camera *);
 
+       /** Deprecated as unsafe.  Use set_matrix() or transform() instead. */
        MatrixStack &matrix_stack() { return mtx_stack; }
 
+       /** Replaces the Renderer's modelview matrix. */
+       void set_matrix(const Matrix &);
+
+       /** Applies a transform to the Renderer's modelview matrix. */
+       void transform(const Matrix &);
+
+       /** Returns the current modelview matrix. */
+       const Matrix &get_matrix() const { return mtx_stack.top(); }
+
        const Camera *get_camera() const { return camera; }
 
        void set_texture(const Texture *);