From 48e758814433a32e4ec3051222ed5dfe172c014f Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos <dharmatech@finkelstein.stackeffects.info> Date: Sun, 27 Jul 2008 00:10:01 -0500 Subject: [PATCH] opengl: Put top-left, top-right, bottom-left, bottom-right, in opengl.private --- extra/opengl/opengl.factor | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extra/opengl/opengl.factor b/extra/opengl/opengl.factor index 9e91119247..be70b1e176 100755 --- a/extra/opengl/opengl.factor +++ b/extra/opengl/opengl.factor @@ -195,6 +195,8 @@ TUPLE: sprite loc dim dim2 dlist texture ; : gl-translate ( point -- ) first2 0.0 glTranslated ; +<PRIVATE + : top-left drop 0 0 glTexCoord2i 0.0 0.0 glVertex2d ; inline : top-right 1 0 glTexCoord2i first 0.0 glVertex2d ; inline @@ -203,6 +205,8 @@ TUPLE: sprite loc dim dim2 dlist texture ; : bottom-right 1 1 glTexCoord2i gl-vertex ; inline +PRIVATE> + : four-sides ( dim -- ) dup top-left dup top-right dup bottom-right bottom-left ;