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:
authorMike Erwin <significant.bit@gmail.com>2017-02-12 09:56:08 +0300
committerMike Erwin <significant.bit@gmail.com>2017-02-12 09:56:08 +0300
commitb104057d001d2472cc55c7fa51cff3275e331523 (patch)
tree02b78998050a5807d471663f63e877b747ba1507 /source/blender/editors/animation/keyframes_draw.c
parent09bfc378895f320bcc12ac5c77252f58780e73fc (diff)
OpenGL: enable program point size for keyframes
Allows vertex shader to determine how large to rasterize each point sprite. Forgot to do this before.
Diffstat (limited to 'source/blender/editors/animation/keyframes_draw.c')
-rw-r--r--source/blender/editors/animation/keyframes_draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 3c5f626fac4..c8d141eab07 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -52,6 +52,7 @@
#include "BKE_fcurve.h"
+#include "GPU_draw.h"
#include "GPU_immediate.h"
#include "UI_resources.h"
@@ -623,6 +624,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
unsigned int color_id = add_attrib(format, "color", COMP_U8, 4, NORMALIZE_INT_TO_FLOAT);
unsigned int outline_color_id = add_attrib(format, "outlineColor", COMP_U8, 4, NORMALIZE_INT_TO_FLOAT);
immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND);
+ GPU_enable_program_point_size();
immBegin(PRIM_POINTS, key_ct);
for (ActKeyColumn *ak = keys->first; ak; ak = ak->next) {
@@ -633,6 +635,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
}
immEnd();
+ GPU_disable_program_point_size();
immUnbindProgram();
}
}