src/sprite.c

changeset 167
8e6a661c87db
parent 163
3628cc3c0483
equal deleted inserted replaced
166:d7a06c1afa0a 167:8e6a661c87db
103 // TODO: how to remove the following cast? 103 // TODO: how to remove the following cast?
104 if (asc_shader_invalid((AscShaderProgram*)shader)) return; 104 if (asc_shader_invalid((AscShaderProgram*)shader)) return;
105 asc_shader_use(&shader->program, camera); 105 asc_shader_use(&shader->program, camera);
106 106
107 // Upload model matrix 107 // Upload model matrix
108 glUniformMatrix4fv(shader->program.model, 1, 108 asc_shader_upload_model_matrix(&shader->program, node);
109 GL_FALSE, node->world_transform);
110 109
111 // Bind texture 110 // Bind texture
112 asc_texture_bind(sprite->texture, shader->tex, 0); 111 asc_texture_bind(sprite->texture, shader->tex, 0);
113 112
114 // Draw mesh 113 // Draw mesh

mercurial