diff --git a/src/gl/shaders/gl_shader.h b/src/gl/shaders/gl_shader.h index d3e8528b..1e03141d 100644 --- a/src/gl/shaders/gl_shader.h +++ b/src/gl/shaders/gl_shader.h @@ -56,6 +56,21 @@ public: hShader = hVertProg = hFragProg = NULL; currentfogenabled = currenttexturemode = 0; currentlightfactor = currentlightdist = 0.0f; + currentfogdensity = -1; + currentfogcolor = 0; + + timer_index = -1; + desaturation_index = -1; + fogenabled_index = -1; + texturemode_index = -1; + camerapos_index = -1; + lightparms_index = -1; + colormapstart_index = -1; + colormaprange_index = -1; + lightrange_index = -1; + fogcolor_index = -1; + lights_index = -1; + } ~FShader(); diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index 4d6689e9..75c26f46 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -538,6 +538,7 @@ FMaterial::FMaterial(FTexture * tx, bool forceexpand) tx->UseType == FTexture::TEX_Decal || forceexpand; + mShaderIndex = 0; // TODO: apply custom shader object here /* if (tx->CustomShaderDefinition) { @@ -569,7 +570,6 @@ FMaterial::FMaterial(FTexture * tx, bool forceexpand) } } } - else mShaderIndex = 0; if (!expanded) { diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index d0141c77..64a9e5d6 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -231,6 +231,7 @@ FTexture::MiscGLInfo::MiscGLInfo() throw() areacount = 0; mIsTransparent = -1; shaderspeed = 1.f; + shaderindex = 0; Material = NULL; SystemTexture = NULL;