Handbook
Glossary
set-blend-mode ( texture -- )
Vocabulary
opengl
.
textures
.
private
Inputs
texture
an
object
Outputs
None
Definition
USING:
accessors
images
kernel
opengl.gl
;
IN:
opengl.textures.private
:
set-blend-mode
( texture -- )
image>>
dup
has-alpha?
[
premultiplied-alpha?>>
[
GL_ONE
GL_ONE_MINUS_SRC_ALPHA
glBlendFunc
]
when
]
[
drop
GL_BLEND
glDisable
]
if
;