From b6ff468aaf1ee16ea045addebd0b31a647dcb966 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 12 Aug 2018 10:55:24 +0300 Subject: [PATCH] - creation of dither texture no longer affects active unit Red checkerboard was rendered upon startup instead of * the first saved game's thumbnail * the first game frame --- src/gl/renderer/gl_renderbuffers.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl/renderer/gl_renderbuffers.cpp b/src/gl/renderer/gl_renderbuffers.cpp index 094e6e30e9..48cbd0e754 100644 --- a/src/gl/renderer/gl_renderbuffers.cpp +++ b/src/gl/renderer/gl_renderbuffers.cpp @@ -576,6 +576,7 @@ void FGLRenderBuffers::BindDitherTexture(int texunit) .8515625, .6015625, .9765625, .7265625, .8671875, .6171875, .9921875, .7421875, }; + glActiveTexture(GL_TEXTURE0 + texunit); mDitherTexture = Create2DTexture("DitherTexture", GL_R32F, 8, 8, data); } mDitherTexture.Bind(1, GL_NEAREST, GL_REPEAT);