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:
authorDalai Felinto <dalai@blender.org>2021-09-23 16:53:38 +0300
committerDalai Felinto <dalai@blender.org>2021-09-23 18:41:11 +0300
commitd0493796a6f40db8dcdd4a9058b98a69282d4759 (patch)
tree7f9e26a80147fc473d2c6a705cfa89a87302bd97 /source/blender/gpu/GPU_shader.h
parentf11bcb5a80eb106560678c8c60be32ad997d6641 (diff)
Cleanup: Remove hardcoded values and rename keyframe shape shaders
No functional change. The shader is complicated by itself, having hardcoded values makes it even more cryptic. I also renamed the shader because the shader is not for the keyfarme diamond only, but for all the keyframe shapes. Differential Revision: https://developer.blender.org/D12615
Diffstat (limited to 'source/blender/gpu/GPU_shader.h')
-rw-r--r--source/blender/gpu/GPU_shader.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 62b748b7edf..c6cfac79699 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -169,7 +169,7 @@ void GPU_shader_set_framebuffer_srgb_target(int use_srgb_to_linear);
typedef enum eGPUBuiltinShader {
/* specialized drawing */
GPU_SHADER_TEXT,
- GPU_SHADER_KEYFRAME_DIAMOND,
+ GPU_SHADER_KEYFRAME_SHAPE,
GPU_SHADER_SIMPLE_LIGHTING,
/* for simple 2D drawing */
/**
@@ -423,6 +423,19 @@ void GPU_shader_free_builtin_shaders(void);
/* Determined by the maximum uniform buffer size divided by chunk size. */
#define GPU_MAX_UNIFORM_ATTR 8
+typedef enum eGPUKeyframeShapes {
+ GPU_KEYFRAME_SHAPE_DIAMOND = (1 << 0),
+ GPU_KEYFRAME_SHAPE_CIRCLE = (1 << 1),
+ GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL = (1 << 2),
+ GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL = (1 << 3),
+ GPU_KEYFRAME_SHAPE_INNER_DOT = (1 << 4),
+ GPU_KEYFRAME_SHAPE_ARROW_END_MAX = (1 << 8),
+ GPU_KEYFRAME_SHAPE_ARROW_END_MIN = (1 << 9),
+ GPU_KEYFRAME_SHAPE_ARROW_END_MIXED = (1 << 10),
+} eGPUKeyframeShapes;
+#define GPU_KEYFRAME_SHAPE_SQUARE \
+ (GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL | GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL)
+
#ifdef __cplusplus
}
#endif