opengl: Put top-left, top-right, bottom-left, bottom-right, in

opengl.private
db4
Eduardo Cavazos 2008-07-27 00:10:01 -05:00
parent 5a0c3e3d73
commit 48e7588144
1 changed files with 4 additions and 0 deletions

View File

@ -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 ;