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-11-17 00:03:15 +0300
committerMike Erwin <significant.bit@gmail.com>2016-11-17 00:03:15 +0300
commitb1f700dad36c943c2c2a6f5477a4400cba5803f0 (patch)
tree780749d42f2455cd3f87af27eed4d6e785f0cf64 /source/blender/gpu/gawain/batch.h
parent36ac979ee01f1a266e944a71272655f94ddcff52 (diff)
Gawain: use PRIM_ and INDEX_ enums instead of GLenum
For a few reasons: - separate enum sets for separate concepts - debug with symbolic names instead of 0x4e72 - prepare for a Vulkan future
Diffstat (limited to 'source/blender/gpu/gawain/batch.h')
-rw-r--r--source/blender/gpu/gawain/batch.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/gawain/batch.h b/source/blender/gpu/gawain/batch.h
index 40d87dd3d14..c2768377a96 100644
--- a/source/blender/gpu/gawain/batch.h
+++ b/source/blender/gpu/gawain/batch.h
@@ -25,7 +25,7 @@ typedef struct {
// geometry
VertexBuffer* verts;
ElementList* elem; // NULL if element list not needed
- GLenum prim_type;
+ PrimitiveType prim_type;
// book-keeping
GLuint vao_id; // remembers all geometry state (vertex attrib bindings & element buffer)
@@ -37,7 +37,7 @@ typedef struct {
GLuint program;
} Batch;
-Batch* Batch_create(GLenum prim_type, VertexBuffer*, ElementList*);
+Batch* Batch_create(PrimitiveType, VertexBuffer*, ElementList*);
void Batch_discard(Batch*); // verts & elem are not discarded
void Batch_discard_all(Batch*); // including verts & elem
@@ -87,11 +87,11 @@ typedef struct {
VertexBuffer verts; // link batch.verts to this
} BatchWithOwnVertexBufferAndElementList;
-Batch* create_BatchWithOwnVertexBuffer(GLenum prim_type, VertexFormat*, unsigned v_ct, ElementList*);
-Batch* create_BatchWithOwnElementList(GLenum prim_type, VertexBuffer*, unsigned prim_ct);
-Batch* create_BatchWithOwnVertexBufferAndElementList(GLenum prim_type, VertexFormat*, unsigned v_ct, unsigned prim_ct);
+Batch* create_BatchWithOwnVertexBuffer(PrimitiveType, VertexFormat*, unsigned v_ct, ElementList*);
+Batch* create_BatchWithOwnElementList(PrimitiveType, VertexBuffer*, unsigned prim_ct);
+Batch* create_BatchWithOwnVertexBufferAndElementList(PrimitiveType, VertexFormat*, unsigned v_ct, unsigned prim_ct);
// verts: shared, own
// elem: none, shared, own
-Batch* create_BatchInGeneral(GLenum prim_type, VertexBufferStuff, ElementListStuff);
+Batch* create_BatchInGeneral(PrimitiveType, VertexBufferStuff, ElementListStuff);
#endif // future plans