From a1ec6ab1ba62361e3f9c35ba706369c6953422fa Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 24 May 2014 16:53:57 +0200 Subject: [PATCH] - fixed some Linux warnings. --- src/gl/scene/gl_scene.cpp | 8 +++++--- src/gl/shaders/gl_shader.cpp | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 15f9444d4..a05aadde4 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -747,7 +747,7 @@ void FGLRenderer::DrawBlend(sector_t * viewsector) // for various reasons (performance and keeping the lighting code clean) // we no longer do colormapped textures on pre GL 3.0 hardware and instead do // just a fullscreen overlay to emulate the inverse invulnerability effect or similar fullscreen blends. - if (gl_fixedcolormap >= CM_FIRSTSPECIALCOLORMAP && gl_fixedcolormap < CM_MAXCOLORMAP) + if (gl_fixedcolormap >= (DWORD)CM_FIRSTSPECIALCOLORMAP && gl_fixedcolormap < (DWORD)CM_MAXCOLORMAP) { FSpecialColormap *scm = &SpecialColormaps[gl_fixedcolormap - CM_FIRSTSPECIALCOLORMAP]; @@ -764,13 +764,14 @@ void FGLRenderer::DrawBlend(sector_t * viewsector) g = scm->ColorizeEnd[1]; b = scm->ColorizeEnd[2]; } - } else if (gl_enhanced_nightvision) { if (gl_fixedcolormap == CM_LITE) { - r = 0.375f, g = 1.0f, b = 0.375f; + r = 0.375f; + g = 1.0f; + b = 0.375f; } else if (gl_fixedcolormap >= CM_TORCH) { @@ -782,6 +783,7 @@ void FGLRenderer::DrawBlend(sector_t * viewsector) } else r = g = b = 1.f; } + else r = g = b = 1.f; if (inverse) { diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index 35916bd00..994fdbf97 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -400,7 +400,7 @@ void FShaderManager::Clean() { if (gl.hasGLSL()) { - glUseProgram(NULL); + glUseProgram(0); mActiveShader = NULL; for (unsigned int i = 0; i < mTextureEffects.Size(); i++) @@ -446,7 +446,7 @@ void FShaderManager::SetActiveShader(FShader *sh) { if (gl.hasGLSL() && mActiveShader != sh) { - glUseProgram(sh!= NULL? sh->GetHandle() : NULL); + glUseProgram(sh!= NULL? sh->GetHandle() : 0); mActiveShader = sh; } }