262 cxListClear(asc_active_glctx->shaders); |
262 cxListClear(asc_active_glctx->shaders); |
263 // also clear the active program to avoid accidental matches with newly created shaders |
263 // also clear the active program to avoid accidental matches with newly created shaders |
264 asc_shader_use(NULL, NULL); |
264 asc_shader_use(NULL, NULL); |
265 } |
265 } |
266 |
266 |
|
267 asc_uniform_loc asc_shader_get_uniform_loc(const AscShaderProgram *shader, const char *name) { |
|
268 return glGetUniformLocation(shader->gl_id, name); |
|
269 } |
|
270 |
267 void asc_shader_upload_model_matrix(const AscShaderProgram *shader, const AscSceneNode *node) { |
271 void asc_shader_upload_model_matrix(const AscShaderProgram *shader, const AscSceneNode *node) { |
268 glUniformMatrix4fv(shader->model, 1,GL_FALSE, node->world_transform); |
272 glUniformMatrix4fv(shader->model, 1,GL_FALSE, node->world_transform); |
269 } |
273 } |
270 |
274 |
271 void asc_shader_upload_col4f(int uniform_id, asc_col4f color) { |
275 void asc_shader_upload_col4f(int uniform_id, asc_col4f color) { |