- fixed bad constant and potential use of uninitialized variable.

This commit is contained in:
Christoph Oelckers 2014-07-27 21:55:25 +02:00
parent 3d24f58bf0
commit c9c93a58a2
2 changed files with 3 additions and 3 deletions

View file

@ -344,12 +344,12 @@ inline void GLFlat::PutFlat(bool fog)
{ {
Colormap.Clear(); 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. // 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; list = (renderflags&SSRF_RENDER3DPLANES) ? GLDL_TRANSLUCENT : GLDL_TRANSLUCENTBORDER;
} }
else if (gltexture != NULL) else
{ {
bool masked = gltexture->isMasked() && ((renderflags&SSRF_RENDER3DPLANES) || stack); bool masked = gltexture->isMasked() && ((renderflags&SSRF_RENDER3DPLANES) || stack);
list = masked ? GLDL_MASKED : GLDL_PLAIN; list = masked ? GLDL_MASKED : GLDL_PLAIN;

View file

@ -121,7 +121,7 @@ void OpenGLFrameBuffer::InitializeState()
if (first) if (first)
{ {
glewExperimental=TRUE; glewExperimental=true;
glewInit(); glewInit();
} }