]> git.tdb.fi Git - libs/gl.git/commitdiff
Give the LIGHTING and CLIPPING flags a LEGACY prefix
authorMikko Rasa <tdb@tdb.fi>
Wed, 26 Oct 2016 17:30:15 +0000 (20:30 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 26 Oct 2016 17:30:41 +0000 (20:30 +0300)
source/renderer.cpp
source/renderer.h

index 3ddb3a6553acd3e1c9ae1593d40dc639e7a07ece..01c17a26ef8cc3ce5019bea833a3224e7c54e19c 100644 (file)
@@ -104,7 +104,7 @@ void Renderer::set_lighting(const Lighting *l)
                l->update_shader_data(standard_shdata, mtx_stack.top());
                changed |= STANDARD_SHDATA;
        }
-       changed |= LIGHTING;
+       changed |= LEGACY_LIGHTING;
 }
 
 void Renderer::set_clipping(const Clipping *c)
@@ -113,7 +113,7 @@ void Renderer::set_clipping(const Clipping *c)
        state->clipping_matrix = mtx_stack.top();
        if(c)
                c->update_shader_data(standard_shdata, mtx_stack.top());
-       changed |= CLIPPING;
+       changed |= LEGACY_CLIPPING;
 }
 
 void Renderer::set_shader_program(const Program *p, const ProgramData *d)
@@ -173,13 +173,13 @@ void Renderer::pop_state()
        {
                if(state->lighting)
                        state->lighting->update_shader_data(standard_shdata, state->lighting_matrix);
-               changed |= LIGHTING;
+               changed |= LEGACY_LIGHTING;
        }
        if(state->clipping!=old_clipping)
        {
                if(state->clipping)
                        state->clipping->update_shader_data(standard_shdata, state->clipping_matrix);
-               changed |= CLIPPING;
+               changed |= LEGACY_CLIPPING;
        }
 }
 
@@ -265,13 +265,13 @@ void Renderer::apply_state()
                else
                        Material::unbind();
 
-               if(changed&LIGHTING)
+               if(changed&LEGACY_LIGHTING)
                {
                        if(state->lighting)
                        {
                                MatrixStack::modelview() = state->lighting_matrix;
                                state->lighting->bind();
-                               changed = (changed&~LIGHTING)|LEGACY_MATRIX;
+                               changed = (changed&~LEGACY_LIGHTING)|LEGACY_MATRIX;
                        }
                        else
                                Lighting::unbind();
@@ -282,11 +282,11 @@ void Renderer::apply_state()
        {
                if(legacy_bindings)
                {
-                       if(changed&CLIPPING)
+                       if(changed&LEGACY_CLIPPING)
                        {
                                MatrixStack::modelview() = state->clipping_matrix;
                                state->clipping->bind(true);
-                               changed = (changed&~CLIPPING)|LEGACY_MATRIX;
+                               changed = (changed&~LEGACY_CLIPPING)|LEGACY_MATRIX;
                        }
                }
                else
index a4c5ef03ca93ad316bb7af61723ac103456c657c..b114f6873648574032e8566bc3897d9e581fa348 100644 (file)
@@ -97,8 +97,8 @@ private:
                LEGACY_MATRIX = 1,
                MODERN_MATRIX = 2,
                MATRIX = LEGACY_MATRIX|MODERN_MATRIX,
-               LIGHTING = 4,
-               CLIPPING = 8,
+               LEGACY_LIGHTING = 4,
+               LEGACY_CLIPPING = 8,
                SHADER_DATA = 16,
                MATERIAL_SHDATA = 32,
                STANDARD_SHDATA = 64