bind-texture-unit ( id target unit -- ) (original) (raw)
bind-texture-unit ( id target unit -- )
Factor handbook » UI framework » Implementing new gadgets » Customizing gadget appearance » Implementing custom drawing logic » OpenGL utility words
Prev: | gl-translate ( point -- ) |
---|---|
Next: | do-enabled ( what quot -- ) |
Vocabulary
opengl
Inputs
id | The id of a texture object. |
---|---|
target | The texture target (e.g., GL_TEXTURE_2D) |
unit | The texture unit to bind (e.g., GL_TEXTURE0) |
Outputs
None
Word description
Binds texture id to texture target target of texture unit unit. Equivalent to unit glActiveTexture target id glBindTexture.
Definition
: bind-texture-unit ( id target unit -- )
glActiveTexture swap glBindTexture gl-error ;