]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderer.h
Roll the various changed flags into a single mask
[libs/gl.git] / source / renderer.h
index ccb23a22a709ff1f864e6179435c9ead36bb5db8..a3ddaa3bd28f3832ce2a21884384727c897ede5f 100644 (file)
@@ -89,16 +89,21 @@ private:
                virtual void update();
        };
 
+       enum ChangeMask
+       {
+               MATRIX = 1,
+               LIGHTING = 4,
+               SHADER_DATA = 8
+       };
+
        MtxStack mtx_stack;
-       bool mtx_changed;
+       unsigned char changed;
        bool matrices_loaded;
        const Camera *camera;
        std::vector<State> state_stack;
        State *state;
-       bool lighting_changed;
        ProgramData standard_shdata;
        std::vector<const ProgramData *> shdata_stack;
-       bool shdata_changed;
        const Buffer *element_buffer;
        std::set<const Renderable *> excluded;
 
@@ -140,9 +145,13 @@ public:
 
        /** Prepares for temporarily bypassing the Renderer by synchronizing the
        current state with GL.  No additional call is necessary to resume using the
-       Renderer. */
+       Renderer.  DEPRECATED. */
        void escape();
 
+       /** Ends rendering, unbinding all objects and resetting state.  There must
+       be no unpopped state in the stack. */
+       void end();
+
        void exclude(const Renderable &);
        void include(const Renderable &);