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:
authorMike Erwin <significant.bit@gmail.com>2017-04-27 18:24:35 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-27 18:24:35 +0300
commitbfaf7a3eb15e36e69fc00448e6c7fd938a6fa2fa (patch)
treec068779e2c86d40fad5188670b25da533e675969 /source/blender/gpu/intern/gpu_texture.c
parenta49708a69181b4c15fb2bd58f6721a39a7e9b0e6 (diff)
OpenGL: stop enabling GL_TEXTURE
Texturing is always enabled in GLSL. Simply use a sampler in the shader. Replaced gpu_generate_mipmap with glGenerateMipmap since the former just Enabled/Disabled the texture target and called the latter. Part of T51164
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 1eab7f37c83..31c871008bd 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -675,14 +675,6 @@ void GPU_texture_bind(GPUTexture *tex, int number)
else
GPU_invalid_tex_bind(tex->target_base);
- /* TODO: remove this lines once we're using GLSL everywhere */
- GLenum target = tex->target_base;
- if (tex->target_base == GL_TEXTURE_1D_ARRAY)
- target = GL_TEXTURE_2D;
- if (tex->target_base == GL_TEXTURE_2D_ARRAY)
- target = GL_TEXTURE_3D;
- glEnable(target);
-
if (number != 0)
glActiveTexture(GL_TEXTURE0);
@@ -704,14 +696,6 @@ void GPU_texture_unbind(GPUTexture *tex)
glBindTexture(tex->target_base, 0);
- /* TODO: remove this lines */
- GLenum target = tex->target_base;
- if (tex->target_base == GL_TEXTURE_1D_ARRAY)
- target = GL_TEXTURE_2D;
- if (tex->target_base == GL_TEXTURE_2D_ARRAY)
- target = GL_TEXTURE_3D;
- glDisable(target);
-
if (tex->number != 0)
glActiveTexture(GL_TEXTURE0);