fixed: The sampler object for camera textures was never initialized.

This commit is contained in:
Christoph Oelckers 2014-09-17 10:52:34 +02:00
parent c773a500f2
commit c5e00dbc53
2 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,7 @@ extern TexFilter_s TexFilter[];
FSamplerManager::FSamplerManager() FSamplerManager::FSamplerManager()
{ {
glGenSamplers(6, mSamplers); glGenSamplers(7, mSamplers);
SetTextureFilterMode(); SetTextureFilterMode();
glSamplerParameteri(mSamplers[5], GL_TEXTURE_MIN_FILTER, GL_NEAREST); glSamplerParameteri(mSamplers[5], GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glSamplerParameteri(mSamplers[5], GL_TEXTURE_MAG_FILTER, GL_NEAREST); glSamplerParameteri(mSamplers[5], GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@ -70,7 +70,7 @@ FSamplerManager::FSamplerManager()
FSamplerManager::~FSamplerManager() FSamplerManager::~FSamplerManager()
{ {
UnbindAll(); UnbindAll();
glDeleteSamplers(6, mSamplers); glDeleteSamplers(7, mSamplers);
} }
void FSamplerManager::UnbindAll() void FSamplerManager::UnbindAll()

View file

@ -7,7 +7,7 @@ class FSamplerManager
{ {
// We need 6 different samplers: 4 for the different clamping modes, // We need 6 different samplers: 4 for the different clamping modes,
// one for 2D-textures and one for voxel textures // one for 2D-textures and one for voxel textures
unsigned int mSamplers[6]; unsigned int mSamplers[7];
unsigned int mLastBound[FHardwareTexture::MAX_TEXTURES]; unsigned int mLastBound[FHardwareTexture::MAX_TEXTURES];
void UnbindAll(); void UnbindAll();