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-10-24 06:16:54 +0300
committerMike Erwin <significant.bit@gmail.com>2016-10-24 06:16:54 +0300
commite53ab2b9eccdc9b427beef4c045f297bb463c64c (patch)
treed6a5d5199bdc640b13078e254bd19721360adfce /source/blender/gpu/gawain/batch.h
parentdabbe6eb22035e8531cf3dee536187864b58356f (diff)
Gawain: fixups & progress for batch API
Diffstat (limited to 'source/blender/gpu/gawain/batch.h')
-rw-r--r--source/blender/gpu/gawain/batch.h11
1 files changed, 9 insertions, 2 deletions
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*);