From 346ed5bd91f10489acd280e2165a951d6938f0df Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 26 Oct 2016 20:30:15 +0300 Subject: [PATCH] Give the LIGHTING and CLIPPING flags a LEGACY prefix --- source/renderer.cpp | 16 ++++++++-------- source/renderer.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/renderer.cpp b/source/renderer.cpp index 3ddb3a65..01c17a26 100644 --- a/source/renderer.cpp +++ b/source/renderer.cpp @@ -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 diff --git a/source/renderer.h b/source/renderer.h index a4c5ef03..b114f687 100644 --- a/source/renderer.h +++ b/source/renderer.h @@ -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 -- 2.45.2