set-blend-mode ( texture -- )


Vocabulary
opengl.textures.private

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 ;