[Bf-blender-cvs] [0f759da] blender2.8: Gawain: batch drawing works
Mike Erwin
noreply at git.blender.org
Tue Sep 20 18:04:24 CEST 2016
Commit: 0f759da370ad8394330a8d09a79f8bcf28a37df5
Author: Mike Erwin
Date: Tue Sep 20 18:03:59 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB0f759da370ad8394330a8d09a79f8bcf28a37df5
Gawain: batch drawing works
Forgot to tell OpenGL which shader program the batch is using. Now it works!
===================================================================
M source/blender/gpu/gawain/batch.c
===================================================================
diff --git a/source/blender/gpu/gawain/batch.c b/source/blender/gpu/gawain/batch.c
index f8183ab..3bf353e 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);
}
More information about the Bf-blender-cvs
mailing list