Handbook
Glossary
make-texture ( image -- id )
Vocabulary
opengl
.
textures
Inputs
image
an
image
Outputs
id
an OpenGL texture ID
Word description
Creates a new OpenGL texture from a pixmap image whose dimensions are equal to
dim
.
Definition
USING:
accessors
kernel
namespaces
opengl
opengl.gl
opengl.textures.private
;
IN:
opengl.textures
:
make-texture
( image -- id )
gen-texture
[
GL_TEXTURE_BIT
[
GL_TEXTURE_2D
swap
glBindTexture
non-power-of-2-textures?
get
[
dup
bitmap>>
tex-image
]
[
[
f
tex-image
]
[
tex-sub-image
]
bi
]
if
]
do-attribs
]
keep
;