Fixed setting the texture unit, still doesn't work.
--- 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);