mirror of
https://github.com/yawut/SDL.git
synced 2026-04-26 00:57:36 -05:00
Fixed setting the texture unit, still doesn't work.
This commit is contained in:
parent
e27e8c5cb6
commit
fa76d28021
|
|
@ -282,7 +282,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for shader support */
|
/* Check for shader support */
|
||||||
//data->shaders = GL_CreateShaderContext();
|
data->shaders = GL_CreateShaderContext();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* We support YV12 textures using 3 textures and a shader */
|
/* We support YV12 textures using 3 textures and a shader */
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data)
|
||||||
SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i);
|
SDL_snprintf(tex_name, SDL_arraysize(tex_name), "tex%d", i);
|
||||||
location = ctx->glGetUniformLocationARB(data->program, tex_name);
|
location = ctx->glGetUniformLocationARB(data->program, tex_name);
|
||||||
if (location >= 0) {
|
if (location >= 0) {
|
||||||
ctx->glUniform1iARB(location, 1);
|
ctx->glUniform1iARB(location, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx->glUseProgramObjectARB(0);
|
ctx->glUseProgramObjectARB(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user