Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2016-09-20 19:03:59 +0300
committerMike Erwin <significant.bit@gmail.com>2016-09-20 19:03:59 +0300
commit0f759da370ad8394330a8d09a79f8bcf28a37df5 (patch)
treea6b27a6d097887dacce69303ef013973835b4736
parent284398e51770e7e80db26a83edf2f4d6d53babf7 (diff)
Gawain: batch drawing works
Forgot to tell OpenGL which shader program the batch is using. Now it works!
-rw-r--r--source/blender/gpu/gawain/batch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/gawain/batch.c b/source/blender/gpu/gawain/batch.c
index f8183abc6f0..3bf353e8b2d 100644
--- a/source/blender/gpu/gawain/batch.c
+++ b/source/blender/gpu/gawain/batch.c
@@ -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);
}