From c9c93a58a2129f79a3c53f7bc4102d03f9ea9e69 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 27 Jul 2014 21:55:25 +0200 Subject: [PATCH] - fixed bad constant and potential use of uninitialized variable. --- src/gl/scene/gl_flats.cpp | 4 ++-- src/gl/system/gl_framebuffer.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 2767a5e80..60b1237d5 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -344,12 +344,12 @@ inline void GLFlat::PutFlat(bool fog) { Colormap.Clear(); } - if (renderstyle!=STYLE_Translucent || alpha < 1.f - FLT_EPSILON || fog) + if (renderstyle!=STYLE_Translucent || alpha < 1.f - FLT_EPSILON || fog || gltexture == NULL) { // translucent 3D floors go into the regular translucent list, translucent portals go into the translucent border list. list = (renderflags&SSRF_RENDER3DPLANES) ? GLDL_TRANSLUCENT : GLDL_TRANSLUCENTBORDER; } - else if (gltexture != NULL) + else { bool masked = gltexture->isMasked() && ((renderflags&SSRF_RENDER3DPLANES) || stack); list = masked ? GLDL_MASKED : GLDL_PLAIN; diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index fa5370b2d..b2f147dc1 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -121,7 +121,7 @@ void OpenGLFrameBuffer::InitializeState() if (first) { - glewExperimental=TRUE; + glewExperimental=true; glewInit(); }