From c5e00dbc533a30e9d14948dbeaae7e5e3d0b4308 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 17 Sep 2014 10:52:34 +0200 Subject: [PATCH] fixed: The sampler object for camera textures was never initialized. --- src/gl/textures/gl_samplers.cpp | 4 ++-- src/gl/textures/gl_samplers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl/textures/gl_samplers.cpp b/src/gl/textures/gl_samplers.cpp index 1eb54ff10..3851d6c71 100644 --- a/src/gl/textures/gl_samplers.cpp +++ b/src/gl/textures/gl_samplers.cpp @@ -50,7 +50,7 @@ extern TexFilter_s TexFilter[]; FSamplerManager::FSamplerManager() { - glGenSamplers(6, mSamplers); + glGenSamplers(7, mSamplers); SetTextureFilterMode(); glSamplerParameteri(mSamplers[5], GL_TEXTURE_MIN_FILTER, GL_NEAREST); glSamplerParameteri(mSamplers[5], GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -70,7 +70,7 @@ FSamplerManager::FSamplerManager() FSamplerManager::~FSamplerManager() { UnbindAll(); - glDeleteSamplers(6, mSamplers); + glDeleteSamplers(7, mSamplers); } void FSamplerManager::UnbindAll() diff --git a/src/gl/textures/gl_samplers.h b/src/gl/textures/gl_samplers.h index a9802674f..26589b4ad 100644 --- a/src/gl/textures/gl_samplers.h +++ b/src/gl/textures/gl_samplers.h @@ -7,7 +7,7 @@ class FSamplerManager { // We need 6 different samplers: 4 for the different clamping modes, // one for 2D-textures and one for voxel textures - unsigned int mSamplers[6]; + unsigned int mSamplers[7]; unsigned int mLastBound[FHardwareTexture::MAX_TEXTURES]; void UnbindAll();