diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2015-01-24 17:50:03 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2015-01-26 18:36:07 +0300 |
commit | c5f5012c5a1b30ee757244782584cab087e22999 (patch) | |
tree | 72b78c749cf7cd6576a1af75bdbef9935d21dbce /source/blender/gpu/GPU_material.h | |
parent | 8174ea2684b8d144de10508c1766117abe4b6a9a (diff) |
Code cleanup: use GPUDynamicType instead of int
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D1026
Diffstat (limited to 'source/blender/gpu/GPU_material.h')
-rw-r--r-- | source/blender/gpu/GPU_material.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index a002c981a8f..a65a123c768 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -123,13 +123,40 @@ typedef struct GPUNodeStack { short sockettype; } GPUNodeStack; +typedef enum GPUDynamicType { + GPU_DYNAMIC_NONE = 0, + GPU_DYNAMIC_OBJECT_VIEWMAT = 1, + GPU_DYNAMIC_OBJECT_MAT = 2, + GPU_DYNAMIC_OBJECT_VIEWIMAT = 3, + GPU_DYNAMIC_OBJECT_IMAT = 4, + GPU_DYNAMIC_OBJECT_COLOR = 5, + GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE = 15, + + GPU_DYNAMIC_LAMP_FIRST = 6, + GPU_DYNAMIC_LAMP_DYNVEC = 6, + GPU_DYNAMIC_LAMP_DYNCO = 7, + GPU_DYNAMIC_LAMP_DYNIMAT = 8, + GPU_DYNAMIC_LAMP_DYNPERSMAT = 9, + GPU_DYNAMIC_LAMP_DYNENERGY = 10, + GPU_DYNAMIC_LAMP_DYNCOL = 11, + GPU_DYNAMIC_LAMP_LAST = 11, + GPU_DYNAMIC_SAMPLER_2DBUFFER = 12, + GPU_DYNAMIC_SAMPLER_2DIMAGE = 13, + GPU_DYNAMIC_SAMPLER_2DSHADOW = 14, + GPU_DYNAMIC_LAMP_DISTANCE = 16, + GPU_DYNAMIC_LAMP_ATT1 = 17, + GPU_DYNAMIC_LAMP_ATT2 = 18, + GPU_DYNAMIC_LAMP_SPOTSIZE = 19, + GPU_DYNAMIC_LAMP_SPOTBLEND = 20, +} GPUDynamicType; + GPUNodeLink *GPU_attribute(CustomDataType type, const char *name); GPUNodeLink *GPU_uniform(float *num); -GPUNodeLink *GPU_dynamic_uniform(float *num, int dynamictype, void *data); +GPUNodeLink *GPU_dynamic_uniform(float *num, GPUDynamicType dynamictype, void *data); GPUNodeLink *GPU_image(struct Image *ima, struct ImageUser *iuser, bool is_data); GPUNodeLink *GPU_image_preview(struct PreviewImage *prv); GPUNodeLink *GPU_texture(int size, float *pixels); -GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, int dynamictype, void *data); +GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, GPUDynamicType dynamictype, void *data); GPUNodeLink *GPU_builtin(GPUBuiltin builtin); GPUNodeLink *GPU_opengl_builtin(GPUOpenGLBuiltin builtin); @@ -183,33 +210,6 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr); /* Export GLSL shader */ -typedef enum GPUDynamicType { - GPU_DYNAMIC_NONE = 0, - GPU_DYNAMIC_OBJECT_VIEWMAT = 1, - GPU_DYNAMIC_OBJECT_MAT = 2, - GPU_DYNAMIC_OBJECT_VIEWIMAT = 3, - GPU_DYNAMIC_OBJECT_IMAT = 4, - GPU_DYNAMIC_OBJECT_COLOR = 5, - GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE = 15, - - GPU_DYNAMIC_LAMP_FIRST = 6, - GPU_DYNAMIC_LAMP_DYNVEC = 6, - GPU_DYNAMIC_LAMP_DYNCO = 7, - GPU_DYNAMIC_LAMP_DYNIMAT = 8, - GPU_DYNAMIC_LAMP_DYNPERSMAT = 9, - GPU_DYNAMIC_LAMP_DYNENERGY = 10, - GPU_DYNAMIC_LAMP_DYNCOL = 11, - GPU_DYNAMIC_LAMP_LAST = 11, - GPU_DYNAMIC_SAMPLER_2DBUFFER = 12, - GPU_DYNAMIC_SAMPLER_2DIMAGE = 13, - GPU_DYNAMIC_SAMPLER_2DSHADOW = 14, - GPU_DYNAMIC_LAMP_DISTANCE = 16, - GPU_DYNAMIC_LAMP_ATT1 = 17, - GPU_DYNAMIC_LAMP_ATT2 = 18, - GPU_DYNAMIC_LAMP_SPOTSIZE = 19, - GPU_DYNAMIC_LAMP_SPOTBLEND = 20, -} GPUDynamicType; - typedef enum GPUDataType { GPU_DATA_NONE = 0, GPU_DATA_1I = 1, // 1 integer |