forked from blender/blender
WIP: uv-simple-select #1
@ -22,6 +22,7 @@
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "GPU_immediate.h"
|
||||
#include "GPU_shader_shared.h"
|
||||
#include "GPU_state.h"
|
||||
|
||||
#include "UI_interface.h"
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "GPU_immediate.h"
|
||||
#include "GPU_immediate_util.h"
|
||||
#include "GPU_matrix.h"
|
||||
#include "GPU_shader_shared.h"
|
||||
#include "GPU_state.h"
|
||||
#include "GPU_viewport.h"
|
||||
|
||||
|
@ -291,20 +291,6 @@ void GPU_shader_uniform_int(GPUShader *shader, int location, int value);
|
||||
|
||||
/** \} */
|
||||
|
||||
/* TODO: Move to shader shared. */
|
||||
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
|
||||
|
@ -11,6 +11,19 @@
|
||||
typedef struct TestOutputRawData TestOutputRawData;
|
||||
#endif
|
||||
|
||||
enum eGPUKeyframeShapes {
|
||||
GPU_KEYFRAME_SHAPE_DIAMOND = (1u << 0u),
|
||||
GPU_KEYFRAME_SHAPE_CIRCLE = (1u << 1u),
|
||||
GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL = (1u << 2u),
|
||||
GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL = (1u << 3u),
|
||||
GPU_KEYFRAME_SHAPE_INNER_DOT = (1u << 4u),
|
||||
GPU_KEYFRAME_SHAPE_ARROW_END_MAX = (1u << 8u),
|
||||
GPU_KEYFRAME_SHAPE_ARROW_END_MIN = (1u << 9u),
|
||||
GPU_KEYFRAME_SHAPE_ARROW_END_MIXED = (1u << 10u),
|
||||
GPU_KEYFRAME_SHAPE_SQUARE = (GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL |
|
||||
GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL),
|
||||
};
|
||||
|
||||
struct NodeLinkData {
|
||||
float4 colors[3];
|
||||
/* bezierPts Is actually a float2, but due to std140 each element needs to be aligned to 16
|
||||
|
@ -1,16 +1,4 @@
|
||||
|
||||
/* Values in GPU_shader.h. */
|
||||
#define GPU_KEYFRAME_SHAPE_DIAMOND (1u << 0)
|
||||
#define GPU_KEYFRAME_SHAPE_CIRCLE (1u << 1)
|
||||
#define GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL (1u << 2)
|
||||
#define GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL (1u << 3)
|
||||
#define GPU_KEYFRAME_SHAPE_INNER_DOT (1u << 4)
|
||||
#define GPU_KEYFRAME_SHAPE_ARROW_END_MAX (1u << 8)
|
||||
#define GPU_KEYFRAME_SHAPE_ARROW_END_MIN (1u << 9)
|
||||
#define GPU_KEYFRAME_SHAPE_ARROW_END_MIXED (1u << 10)
|
||||
#define GPU_KEYFRAME_SHAPE_SQUARE \
|
||||
(GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL | GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL)
|
||||
|
||||
const float diagonal_scale = sqrt(0.5);
|
||||
|
||||
const float minmax_bias = 0.7;
|
||||
|
@ -1,16 +1,4 @@
|
||||
|
||||
/* Values in GPU_shader.h. */
|
||||
#define GPU_KEYFRAME_SHAPE_DIAMOND (1u << 0)
|
||||
#define GPU_KEYFRAME_SHAPE_CIRCLE (1u << 1)
|
||||
#define GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL (1u << 2)
|
||||
#define GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL (1u << 3)
|
||||
#define GPU_KEYFRAME_SHAPE_INNER_DOT (1u << 4)
|
||||
#define GPU_KEYFRAME_SHAPE_ARROW_END_MAX (1u << 8)
|
||||
#define GPU_KEYFRAME_SHAPE_ARROW_END_MIN (1u << 9)
|
||||
#define GPU_KEYFRAME_SHAPE_ARROW_END_MIXED (1u << 10)
|
||||
#define GPU_KEYFRAME_SHAPE_SQUARE \
|
||||
(GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL | GPU_KEYFRAME_SHAPE_CLIPPED_HORIZONTAL)
|
||||
|
||||
const float line_falloff = 1.0;
|
||||
const float circle_scale = sqrt(2.0 / 3.1416);
|
||||
const float square_scale = sqrt(0.5);
|
||||
|
@ -15,6 +15,7 @@ GPU_SHADER_INTERFACE_INFO(keyframe_shape_iface, "")
|
||||
.flat(Type::UINT, "finalFlags");
|
||||
|
||||
GPU_SHADER_CREATE_INFO(gpu_shader_keyframe_shape)
|
||||
.typedef_source("GPU_shader_shared.h")
|
||||
.vertex_in(0, Type::VEC4, "color")
|
||||
.vertex_in(1, Type::VEC4, "outlineColor")
|
||||
.vertex_in(2, Type::VEC2, "pos")
|
||||
|
Loading…
Reference in New Issue
Block a user