changeset 5234:c015d3e63631

Fixed setting the texture unit, still doesn't work.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 08 Feb 2011 16:50:51 -0800
parents 811beeb698f9
children 8efa43b915be
files src/render/opengl/SDL_render_gl.c src/render/opengl/SDL_shaders_gl.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);