GLACTIVETEXTUREARB(3G)
π NAME π
glActiveTextureARB β pick which texture unit is the one π
β¨ C SPECIFICATION β¨
void glActiveTextureARB( GLenum texture )
delim $$
π PARAMETERS π
textureβ tells the universe which texture unit is gonna be active from now on, bestie. How many texture units you actually get is implementation dependent, but it's gotta be at least two, no negotiation.texturehas to be one ofGL_TEXTURE$i$_ARB, where0 β€ $ i $ < GL_MAX_TEXTURE_UNITS_ARB, and that upper bound is an implementation-dependent value, so likeβ¦ look it up, don't guess π«Ά. The initial value isGL_TEXTURE0_ARB.
πΈ DESCRIPTION πΈ
So here's the vibe: glActiveTextureARB selects which texture unit all the subsequent texture state calls are gonna affect. Like, you're choosing which one gets the attention. Main character selection, fr fr π
The number of texture units an implementation supports is implementation dependent, but it must be at least 2 β that's the floor, periodt.
Also, quick side quest: vertex arrays are client-side GL resources, and those get selected by the glClientActiveTextureARB routine instead. Different function, different job, don't mix them up π¦
π¦ NOTES π¦
glActiveTextureARB is only supported if GL_ARB_multitexture shows up in the string that glGetString returns when you call it with the argument GL_EXTENSIONS. If it's not in there, it's giving unsupported, and you gotta deal π
π ERRORS π
GL_INVALID_ENUMβ gets generated whentextureis not one ofGL_TEXTURE$i$_ARB, where0 β€ $ i $ < GL_MAX_TEXTURE_UNITS_ARB. Color outside those lines and the GL gods say no π
π SEE ALSO π
glClientActiveTextureARB(3G)glGetIntegerv(3G)glMultiTexCoordARB(3G)glTexParameter(3G)
That's the whole page, bestie β GLACTIVETEXTUREARB(3G) from the 3G manual, your one-stop shop for texture unit selection π Stay slaying, keep your enums valid, and may all your texture units be at least two β¨π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms