From cfe1b2b8daf492aea9fecf01f1c3340819640ff5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 1 Apr 2014 22:33:32 +0200 Subject: [PATCH] GL3: Don't call virtual getters for accessing internal data, please --HG-- branch : opengl3 --- .../src/3d/driver/opengl3/driver_opengl_program.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl_program.cpp b/code/nel/src/3d/driver/opengl3/driver_opengl_program.cpp index e1b8c12a0..e23f00f4f 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl_program.cpp +++ b/code/nel/src/3d/driver/opengl3/driver_opengl_program.cpp @@ -992,15 +992,7 @@ void CDriverGL3::setupUniforms(TProgram program) uint fogColorIdx = p->getUniformIndex(CProgramIndex::FogColor); if (fogColorIdx != ~0) - { - GLfloat glCol[ 4 ]; - CRGBA col = getFogColor(); - glCol[ 0 ] = col.R / 255.0f; - glCol[ 1 ] = col.G / 255.0f; - glCol[ 2 ] = col.B / 255.0f; - glCol[ 3 ] = col.A / 255.0f; - nglProgramUniform4f(progId, fogColorIdx, glCol[0], glCol[1], glCol[2], glCol[3]); - } + nglProgramUniform4fv(progId, fogColorIdx, 1, _CurrentFogColor); uint colorIndex = p->getUniformIndex(CProgramIndex::Color); if (colorIndex != ~0)