Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 1d870ed2fdc..ca0d633aa9e 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -1771,6 +1771,12 @@ void GPU_texture_unbind(GPUTexture *tex)
void GPU_texture_unbind_all(void)
{
+ if (GLEW_ARB_multi_bind) {
+ glBindTextures(0, GPU_max_textures(), NULL);
+ glBindSamplers(0, GPU_max_textures(), NULL);
+ return;
+ }
+
for (int i = 0; i < GPU_max_textures(); i++) {
glActiveTexture(GL_TEXTURE0 + i);
glBindTexture(GL_TEXTURE_2D, 0);
@@ -1785,6 +1791,8 @@ void GPU_texture_unbind_all(void)
}
glBindSampler(i, 0);
}
+
+ glActiveTexture(GL_TEXTURE0);
}
#define WARN_NOT_BOUND(_tex) \