From e53ab2b9eccdc9b427beef4c045f297bb463c64c Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Sun, 23 Oct 2016 23:16:54 -0400 Subject: Gawain: fixups & progress for batch API --- source/blender/gpu/gawain/batch.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/gawain/batch.h') diff --git a/source/blender/gpu/gawain/batch.h b/source/blender/gpu/gawain/batch.h index 8b132aa3c02..c0f0e93ce9a 100644 --- a/source/blender/gpu/gawain/batch.h +++ b/source/blender/gpu/gawain/batch.h @@ -31,6 +31,7 @@ typedef struct { GLuint vao_id; // remembers all geometry state (vertex attrib bindings & element buffer) BatchPhase phase; bool program_dirty; + bool program_in_use; // state GLuint program; @@ -38,13 +39,19 @@ typedef struct { Batch* Batch_create(GLenum prim_type, VertexBuffer*, ElementList*); -// TODO: void Batch_discard(Batch*); -// must first decide how sharing of vertex buffers & index buffers should work +void Batch_discard(Batch*); // verts & elem are not discarded +void Batch_discard_all(Batch*); // including verts & elem void Batch_set_program(Batch*, GLuint program); // Entire batch draws with one shader program, but can be redrawn later with another program. // Vertex shader's inputs must be compatible with the batch's vertex format. +void Batch_Uniform1b(Batch*, const char* name, bool value); +// void Batch_Uniform1f(Batch*, float value); +// void Batch_Uniform4f(Batch*, float x, float y, float z, float w); +void Batch_Uniform3fv(Batch*, const char* name, const float data[3]); +void Batch_Uniform4fv(Batch*, const char* name, const float data[4]); + void Batch_draw(Batch*); -- cgit v1.2.3