Fixed setting the texture unit, still doesn't work.
authorSam Lantinga <slouken@libsdl.org>
Tue, 08 Feb 2011 16:50:51 -0800
changeset 5229 c015d3e63631
parent 5228 811beeb698f9
child 5230 8efa43b915be
Fixed setting the texture unit, still doesn't work.
src/render/opengl/SDL_render_gl.c
src/render/opengl/SDL_shaders_gl.c
--- a/src/render/opengl/SDL_render_gl.c	Tue Feb 08 16:27:52 2011 -0800
+++ b/src/render/opengl/SDL_render_gl.c	Tue Feb 08 16:50:51 2011 -0800
@@ -282,7 +282,7 @@
     }
 
     /* Check for shader support */
-    //data->shaders = GL_CreateShaderContext();
+    data->shaders = GL_CreateShaderContext();
 
 #if 0
     /* We support YV12 textures using 3 textures and a shader */
--- a/src/render/opengl/SDL_shaders_gl.c	Tue Feb 08 16:27:52 2011 -0800
+++ b/src/render/opengl/SDL_shaders_gl.c	Tue Feb 08 16:50:51 2011 -0800
@@ -183,7 +183,7 @@
         SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i);
         location = ctx->glGetUniformLocationARB(data->program, tex_name);
         if (location >= 0) {
-            ctx->glUniform1iARB(location, 1);
+            ctx->glUniform1iARB(location, i);
         }
     }
     ctx->glUseProgramObjectARB(0);