[4/6] wined3d: Don't explicitly enable GL_TEXTURE_2D with NULL textures.

Matteo Bruni matteo.mystral at gmail.com
Mon Jul 4 15:32:50 CDT 2011


-------------- next part --------------
From c3a100fc1dea169f43770d9f375abf1be4e25f1a Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni at codeweavers.com>
Date: Fri, 1 Jul 2011 19:59:58 +0200
Subject: wined3d: Don't explicitly enable GL_TEXTURE_2D with NULL textures.

Now that we always have textures bound to every texture target, there is
no need to switch to GL_TEXTURE_2D when the texture is set to NULL.
---
 dlls/wined3d/utils.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 25cb4ee..3130a5e 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3106,22 +3106,6 @@ void texture_activate_dimensions(const struct wined3d_texture *texture, const st
                 checkGLcall("glEnable(GL_TEXTURE_CUBE_MAP_ARB)");
               break;
         }
-    } else {
-        glEnable(GL_TEXTURE_2D);
-        checkGLcall("glEnable(GL_TEXTURE_2D)");
-        glDisable(GL_TEXTURE_3D);
-        checkGLcall("glDisable(GL_TEXTURE_3D)");
-        if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
-        {
-            glDisable(GL_TEXTURE_CUBE_MAP_ARB);
-            checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
-        }
-        if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
-        {
-            glDisable(GL_TEXTURE_RECTANGLE_ARB);
-            checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
-        }
-        /* Binding textures is done by samplers. A dummy texture will be bound */
     }
 }
 
-- 
1.7.3.4


More information about the wine-patches mailing list