[Bf-blender-cvs] [4d93323b8aa] blender2.8: Gawain: name struct's

Campbell Barton noreply at git.blender.org
Thu Aug 17 12:35:33 CEST 2017


Commit: 4d93323b8aa5b9da39195fb7d67bb8998734e08c
Author: Campbell Barton
Date:   Thu Aug 17 20:37:37 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB4d93323b8aa5b9da39195fb7d67bb8998734e08c

Gawain: name struct's

Needed to reference without first including headers.

===================================================================

M	intern/gawain/gawain/gwn_attr_binding.h
M	intern/gawain/gawain/gwn_batch.h
M	intern/gawain/gawain/gwn_element.h
M	intern/gawain/gawain/gwn_shader_interface.h
M	intern/gawain/gawain/gwn_vertex_buffer.h
M	intern/gawain/gawain/gwn_vertex_format.h

===================================================================

diff --git a/intern/gawain/gawain/gwn_attr_binding.h b/intern/gawain/gawain/gwn_attr_binding.h
index e8c46696b7c..a209e1c4f0f 100644
--- a/intern/gawain/gawain/gwn_attr_binding.h
+++ b/intern/gawain/gawain/gwn_attr_binding.h
@@ -13,7 +13,7 @@
 
 #include "gwn_common.h"
 
-typedef struct {
+typedef struct Gwn_AttrBinding {
 	uint64_t loc_bits; // store 4 bits for each of the 16 attribs
 	uint16_t enabled_bits; // 1 bit for each attrib
 } Gwn_AttrBinding;
diff --git a/intern/gawain/gawain/gwn_batch.h b/intern/gawain/gawain/gwn_batch.h
index 1dd4621f1a3..41e3f66637b 100644
--- a/intern/gawain/gawain/gwn_batch.h
+++ b/intern/gawain/gawain/gwn_batch.h
@@ -101,17 +101,17 @@ void GWN_batch_draw_stupid_instanced_with_batch(Gwn_Batch*, Gwn_Batch*);
 // We often need a batch with its own data, to be created and discarded together.
 // WithOwn variants reduce number of system allocations.
 
-typedef struct {
+typedef struct BatchWithOwnVertexBuffer {
 	Gwn_Batch batch;
 	Gwn_VertBuf verts; // link batch.verts to this
 } BatchWithOwnVertexBuffer;
 
-typedef struct {
+typedef struct BatchWithOwnElementList {
 	Gwn_Batch batch;
 	Gwn_IndexBuf elem; // link batch.elem to this
 } BatchWithOwnElementList;
 
-typedef struct {
+typedef struct BatchWithOwnVertexBufferAndElementList {
 	Gwn_Batch batch;
 	Gwn_IndexBuf elem; // link batch.elem to this
 	Gwn_VertBuf verts; // link batch.verts to this
diff --git a/intern/gawain/gawain/gwn_element.h b/intern/gawain/gawain/gwn_element.h
index 2f7e22fe2d1..3081305769f 100644
--- a/intern/gawain/gawain/gwn_element.h
+++ b/intern/gawain/gawain/gwn_element.h
@@ -21,7 +21,7 @@ typedef enum {
 	GWN_INDEX_U32
 } Gwn_IndexBufType;
 
-typedef struct {
+typedef struct Gwn_IndexBuf {
 	unsigned index_ct;
 #if GWN_TRACK_INDEX_RANGE
 	Gwn_IndexBufType index_type;
@@ -37,7 +37,7 @@ typedef struct {
 void GWN_indexbuf_use(Gwn_IndexBuf*);
 unsigned GWN_indexbuf_size_get(const Gwn_IndexBuf*);
 
-typedef struct {
+typedef struct Gwn_IndexBufBuilder {
 	unsigned max_allowed_index;
 	unsigned max_index_ct;
 	unsigned index_ct;
diff --git a/intern/gawain/gawain/gwn_shader_interface.h b/intern/gawain/gawain/gwn_shader_interface.h
index 61bdd05d5e0..cb3aeb84239 100644
--- a/intern/gawain/gawain/gwn_shader_interface.h
+++ b/intern/gawain/gawain/gwn_shader_interface.h
@@ -30,7 +30,7 @@ typedef enum {
 	GWN_UNIFORM_CUSTOM // custom uniform, not one of the above built-ins
 } Gwn_UniformBuiltin;
 
-typedef struct {
+typedef struct Gwn_ShaderInput {
 	const char* name;
 	unsigned name_hash;
 	GLenum gl_type;
@@ -39,7 +39,7 @@ typedef struct {
 	GLint location;
 } Gwn_ShaderInput;
 
-typedef struct {
+typedef struct Gwn_ShaderInterface {
 	uint16_t uniform_ct;
 	uint16_t attrib_ct;
 	Gwn_ShaderInput inputs[0]; // dynamic size, uniforms followed by attribs
diff --git a/intern/gawain/gawain/gwn_vertex_buffer.h b/intern/gawain/gawain/gwn_vertex_buffer.h
index d068fba855a..5ad82251e79 100644
--- a/intern/gawain/gawain/gwn_vertex_buffer.h
+++ b/intern/gawain/gawain/gwn_vertex_buffer.h
@@ -21,7 +21,7 @@
 
 // Is Gwn_VertBuf always used as part of a Gwn_Batch?
 
-typedef struct {
+typedef struct Gwn_VertBuf {
 	Gwn_VertFormat format;
 	unsigned vertex_ct;
 	GLubyte* data; // NULL indicates data in VRAM (unmapped) or not yet allocated
@@ -51,7 +51,7 @@ void GWN_vertbuf_attr_fill(Gwn_VertBuf*, unsigned a_idx, const void* data); // t
 void GWN_vertbuf_attr_fill_stride(Gwn_VertBuf*, unsigned a_idx, unsigned stride, const void* data);
 
 // For low level access only
-typedef struct {
+typedef struct Gwn_VertBufRaw {
 	unsigned size;
 	unsigned stride;
 	GLubyte* data;
diff --git a/intern/gawain/gawain/gwn_vertex_format.h b/intern/gawain/gawain/gwn_vertex_format.h
index 4b867ecbb45..348e6399afa 100644
--- a/intern/gawain/gawain/gwn_vertex_format.h
+++ b/intern/gawain/gawain/gwn_vertex_format.h
@@ -38,7 +38,7 @@ typedef enum {
 	GWN_FETCH_INT_TO_FLOAT // 127 (any int type) -> 127.0
 } Gwn_VertFetchMode;
 
-typedef struct {
+typedef struct Gwn_VertAttr {
 	Gwn_VertCompType comp_type;
 	unsigned gl_comp_type;
 	unsigned comp_ct; // 1 to 4
@@ -49,7 +49,7 @@ typedef struct {
 	unsigned name_ct;
 } Gwn_VertAttr;
 
-typedef struct {
+typedef struct Gwn_VertFormat {
 	unsigned attrib_ct; // 0 to 16 (GWN_VERT_ATTR_MAX_LEN)
 	unsigned name_ct; // total count of active vertex attrib
 	unsigned stride; // stride in bytes, 1 to 256
@@ -67,7 +67,7 @@ void GWN_vertformat_alias_add(Gwn_VertFormat*, const char* alias);
 
 // format conversion
 
-typedef struct {
+typedef struct Gwn_PackedNormal {
 	int x : 10;
 	int y : 10;
 	int z : 10;




More information about the Bf-blender-cvs mailing list