fill in the rest of the GL functions. finally

This commit is contained in:
jp9000
2013-10-12 20:18:05 -07:00
parent e591256922
commit 9577ddcf9b
12 changed files with 329 additions and 30 deletions

View File

@@ -77,6 +77,9 @@ static bool gl_add_param(struct gs_shader *shader, struct shader_var *var,
if (!gl_success("glGetUniformLocation"))
return false;
if (param.type == SHADER_PARAM_TEXTURE)
glUniform1i(param.param, param.texture_id);
return true;
}
@@ -155,6 +158,12 @@ static inline bool gl_add_attrib(struct gs_shader *shader,
if (attrib.attrib == -1)
return false;
if (attrib.type == ATTRIB_TARGET) {
glBindFragDataLocation(shader->program, 0, pa->name.array);
if (!gl_success("glBindFragDataLocation"))
return false;
}
da_push_back(shader->attribs, &attrib);
return true;
}