diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-23 08:45:46 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-23 08:46:14 +0300 |
commit | 09ad6842499f638ecd944714c0a82ba8deebb073 (patch) | |
tree | f3f3f3be2571d530497850b9196e0c23ff3e8093 /source/blender/editors/space_time | |
parent | c2366009c06ad7bdda29d182f8f3b4550cc0e123 (diff) |
cleanup use of GPU matrix API
Take advantage of 2D functions, rotation about the X Y or Z axis, uniform scale factors.
We no longer need to call gpuMatrixBegin_legacy() before using the new API locally in functions.
related to T49450
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 986ac062b05..17b30fd8bae 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -127,7 +127,6 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene) BKE_ptcache_ids_from_object(&pidlist, ob, scene, 0); - gpuMatrixBegin3D_legacy(); unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); @@ -162,8 +161,8 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene) continue; gpuPushMatrix(); - gpuTranslate3f(0.0, (float)V2D_SCROLL_HEIGHT + yoffs, 0.0); - gpuScale3f(1.0, cache_draw_height, 0.0); + gpuTranslate2f(0.0, (float)V2D_SCROLL_HEIGHT + yoffs); + gpuScale2f(1.0, cache_draw_height); switch (pid->type) { case PTCACHE_TYPE_SOFTBODY: @@ -240,7 +239,6 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene) } immUnbindProgram(); - gpuMatrixEnd(); BLI_freelistN(&pidlist); } |