draw-scaled-texture ( dim texture -- )


Vocabulary
opengl.textures

Definition
IN: opengl.textures

GENERIC: draw-scaled-texture ( dim texture -- )


Methods
USING: kernel opengl.textures opengl.textures.private ;

M: multi-texture draw-scaled-texture nip draw-texture ;


USING: accessors kernel opengl.textures opengl.textures.private
;

M: single-texture draw-scaled-texture
2dup dim>> =
[ nip draw-texture ]
[ dup texture>> [ draw-textured-rect ] [ 2drop ] if ] if ;