diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-04-10 16:16:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-04-10 16:17:26 +0300 |
commit | 9fd3435a93b45b80237419b1b218afdce72d4b9d (patch) | |
tree | a2d45089b59162a8926880e3d7a97312ee42261b /source/blender/editors/space_time | |
parent | 2d158a425dc5c9548a3622f9bc4f65d796c5244d (diff) |
First batch of PRIM_QUAD_XXX replacement by PRIM_TRIANGLES.
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index a47fd3a2e34..9b149366670 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -196,8 +196,8 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene) break; } - int sta = pid->cache->startframe, end = pid->cache->endframe; - int len = (end - sta + 1) * 4; + const int sta = pid->cache->startframe, end = pid->cache->endframe; + const int len = (end - sta + 1) * 6; glEnable(GL_BLEND); @@ -214,9 +214,8 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene) immUniformColor4fv(col); -#ifdef WITH_GL_PROFILE_COMPAT if (len > 0) { - immBeginAtMost(PRIM_QUADS_XXX, len); + immBeginAtMost(PRIM_TRIANGLES, len); /* draw a quad for each cached frame */ for (int i = sta; i <= end; i++) { @@ -224,13 +223,15 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene) immVertex2f(pos, (float)i - 0.5f, 0.0f); immVertex2f(pos, (float)i - 0.5f, 1.0f); immVertex2f(pos, (float)i + 0.5f, 1.0f); + + immVertex2f(pos, (float)i - 0.5f, 0.0f); + immVertex2f(pos, (float)i + 0.5f, 1.0f); immVertex2f(pos, (float)i + 0.5f, 0.0f); } } immEnd(); } -#endif glDisable(GL_BLEND); |