From 8a87a8077e43689b20a17f5afe73967665ad3040 Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Tue, 17 Jan 2017 22:16:29 +0300 Subject: [PATCH] charts.lines: reduce the amount of data copying in draw-lines --- lines/lines.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lines/lines.factor b/lines/lines.factor index 4c8f795eb5..6c17c17b5a 100644 --- a/lines/lines.factor +++ b/lines/lines.factor @@ -172,8 +172,8 @@ ALIAS: y second PRIVATE> : draw-line ( seq -- ) - dup dup length odd? [ [ 1 head* ] dip ] [ 1 head* ] if - 1 tail append + dup [ 1 head-slice* ] over length odd? [ dip ] [ call ] if + 1 tail-slice append [ (line-vertices) gl-vertex-pointer GL_LINES 0 ] keep length glDrawArrays ;