diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2015-01-24 17:20:26 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2015-01-26 18:36:01 +0300 |
commit | 3a3d68cd885ba6d9550c7b6ed6207a9d21380d93 (patch) | |
tree | 19b757a1854f25ead94f80e4fc596b981118888b /source/blender/gpu/intern/gpu_codegen.h | |
parent | fdb55e3719b20ef7e4f47cbd674c9f3aabf4520f (diff) |
Code cleanup: use bool instead of int
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D1026
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.h')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 5c19f259214..519fe84c82f 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -71,7 +71,9 @@ struct GPUNode { struct GPUNode *next, *prev; const char *name; - int tag; + + /* Internal flag to mark nodes during pruning */ + bool tag; ListBase inputs; ListBase outputs; @@ -84,14 +86,14 @@ struct GPUNodeLink { const char *attribname; GPUNodeLinkImage image; - int image_isdata; + bool image_isdata; - int texture; + bool texture; int texturesize; void *ptr1, *ptr2; - int dynamic; + bool dynamic; int dynamictype; GPUType type; @@ -127,15 +129,15 @@ typedef struct GPUInput { int id; /* unique id as created by code generator */ int texid; /* number for multitexture, starting from zero */ int attribid; /* id for vertex attributes */ - int bindtex; /* input is responsible for binding the texture? */ - int definetex; /* input is responsible for defining the pixel? */ + bool bindtex; /* input is responsible for binding the texture? */ + bool definetex; /* input is responsible for defining the pixel? */ int textarget; /* GL_TEXTURE_* */ GPUType textype; /* datatype */ struct Image *ima; /* image */ struct ImageUser *iuser;/* image user */ struct PreviewImage *prv; /* preview images & icons */ - int image_isdata; /* image does not contain color data */ + bool image_isdata; /* image does not contain color data */ float *dynamicvec; /* vector data in case it is dynamic */ int dynamictype; /* origin of the dynamic uniform (GPUDynamicType) */ void *dynamicdata; /* data source of the dynamic uniform */ @@ -145,7 +147,7 @@ typedef struct GPUInput { float vec[16]; /* vector data */ GPUNodeLink *link; - int dynamictex; /* dynamic? */ + bool dynamictex; /* dynamic? */ CustomDataType attribtype; /* attribute type */ char attribname[32]; /* attribute name */ int attribfirst; /* this is the first one that is bound */ |