Fixed setting the texture unit, still doesn't work.
authorSam Lantinga <slouken@libsdl.org>
Tue, 08 Feb 2011 16:50:51 -0800
changeset 5229c015d3e63631
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
     1.1 --- a/src/render/opengl/SDL_render_gl.c	Tue Feb 08 16:27:52 2011 -0800
     1.2 +++ b/src/render/opengl/SDL_render_gl.c	Tue Feb 08 16:50:51 2011 -0800
     1.3 @@ -282,7 +282,7 @@
     1.4      }
     1.5  
     1.6      /* Check for shader support */
     1.7 -    //data->shaders = GL_CreateShaderContext();
     1.8 +    data->shaders = GL_CreateShaderContext();
     1.9  
    1.10  #if 0
    1.11      /* We support YV12 textures using 3 textures and a shader */
     2.1 --- a/src/render/opengl/SDL_shaders_gl.c	Tue Feb 08 16:27:52 2011 -0800
     2.2 +++ b/src/render/opengl/SDL_shaders_gl.c	Tue Feb 08 16:50:51 2011 -0800
     2.3 @@ -183,7 +183,7 @@
     2.4          SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i);
     2.5          location = ctx->glGetUniformLocationARB(data->program, tex_name);
     2.6          if (location >= 0) {
     2.7 -            ctx->glUniform1iARB(location, 1);
     2.8 +            ctx->glUniform1iARB(location, i);
     2.9          }
    2.10      }
    2.11      ctx->glUseProgramObjectARB(0);