GLPRIORITIZETEXTURES(3G)
π GLPRIORITIZETEXTURES(3G) β or, how to tell your textures who's the main character
okay bestie, welcome to the 3G manual, babe β this is glPrioritizeTextures, and it's literally the tool that lets you rank your textures like a group chat ranking of who's most likely to show up. πΈ
β¨ NAME β¨
glPrioritizeTextures β set texture residence priority π
π C SPECIFICATION π
void glPrioritizeTextures( GLsizei n,
const GLuint *textures,
const GLclampf *priorities )
no cap, that's the whole signature, copy it exactly bestie π«Ά
π PARAMETERS π
nβ the number of textures you're out here prioritizing. how many glow-ups are we doing today, queen?texturesβ an array holding the names of the textures getting the priority treatment. it's the guest list πprioritiesβ an array holding the actual texture priorities. and the way this works is: a priority sitting in one element ofprioritiesapplies to the texture named by the corresponding element oftextures. so element 0 matches element 0, element 1 matches element 1, it's giving matched set energy π₯
π DESCRIPTION π
glPrioritizeTextures assigns the n texture priorities in priorities to the n textures named in textures. simple as that, fr fr.
so here's the tea: the GL keeps a "working set" of textures that are resident in texture memory. β¨ these resident textures can be bound to a texture target way more efficiently than textures that aren't resident. by letting you specify a priority for each texture, glPrioritizeTextures lets your application guide the GL implementation in deciding which textures should be the resident ones. it's basically you being the group chat admin of texture memory π
the priorities in priorities get clamped to the range [0,1] before they're assigned. here's the vibe check:
0= the lowest priority. textures with priority0are the least likely to be resident. they're the ones left on read π1= the highest priority. textures with priority1are the most likely to be resident. main character energy only π
but β and this is important β textures are not guaranteed to be resident until they are actually used. so don't come for me if your priority-1 texture is still not showing up, bestie, the GL said what it said.
glPrioritizeTextures silently ignores attempts to prioritize texture 0, or any texture name that doesn't correspond to an existing texture. like, no error, no drama, just ignored. π
also: glPrioritizeTextures does not require any of the textures named by textures to be bound to a texture target. glTexParameter may also be used to set a texture's priority, but only if the texture is currently bound. and heads up β that's the only way to set the priority of a default texture. iykyk π
π NOTES π
glPrioritizeTextures is available only if the GL version is 1.1 or greater. so check your version before you get too excited, gorgeous. β
π ERRORS π
GL_INVALID_VALUEis generated ifnis negative. negative count?? not on my watch π ββοΈGL_INVALID_OPERATIONis generated ifglPrioritizeTexturesis executed between the execution ofglBeginand the corresponding execution ofglEnd. so do NOT call it inside a begin/end pair, bestie, that's the forbidden zone π«
π ASSOCIATED GETS π
glGetTexParameter with parameter name GL_TEXTURE_PRIORITY retrieves the priority of a currently bound texture. that's your little peek-behind-the-curtain, go look at what priority your bound texture actually got π¦
π SEE ALSO π
glAreTexturesResident(3G)glBindTexture(3G)glCopyTexImage1D(3G)glCopyTexImage2D(3G)glTexImage1D(3G)glTexImage2D(3G)glTexImage3D(3G)glTexParameter(3G)
okay that's the whole page, no notes, ate and left no crumbs ππ and for the cute sign-off: this little masterpiece is filed under GLPRIORITIZETEXTURES(3G) β that's the source/version-and-date footer, bestie, so if you ever need to cite it, that's the one. mwah πβ¨
π¦ 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