Gawain: batch drawing works

Forgot to tell OpenGL which shader program the batch is using. Now it works!
This commit is contained in:
Mike Erwin 2016-09-20 18:03:59 +02:00
parent 284398e517
commit 0f759da370
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,8 @@ void Batch_draw(Batch* batch)
if (batch->program_dirty)
Batch_update_program_bindings(batch);
glUseProgram(batch->program);
if (batch->elem)
{
const ElementList* el = batch->elem;
@ -117,5 +119,6 @@ void Batch_draw(Batch* batch)
else
glDrawArrays(batch->prim_type, 0, batch->verts->vertex_ct);
glUseProgram(0);
glBindVertexArray(0);
}