Handbook
Glossary
gl3-draw-texture ( loc dim texture-id flipped? -- )
Vocabulary
ui
.
render
Inputs
loc
an
object
dim
an
object
texture-id
an
object
flipped?
an
object
Outputs
None
Definition
USING:
accessors
kernel
namespaces
opengl.gl
sequences
;
IN:
ui.render
::
gl3-draw-texture
( loc dim texture-id flipped? -- )
bind-texture-state
current-projection-dim
get-global
first2
set-texture-projection
current-modelview
get-global
gl3-state>
tex-modelview-loc>>
swap
upload-matrix
GL_TEXTURE0
glActiveTexture
GL_TEXTURE_2D
texture-id
glBindTexture
gl3-state>
tex-sampler-loc>>
0
glUniform1i
flipped?
[
loc dim
make-textured-quad-vertices-flipped
]
[
loc dim
make-textured-quad-vertices
]
if
upload-textured-vertices
GL_TRIANGLES
0 6
glDrawArrays
GL_TEXTURE_2D
0
glBindTexture
restore-color-state
;