GLGETPIXELMAP(3G)
β¨ GLGETPIXELMAP β¨
okay bestie, this is the GLGETPIXELMAP(3G) page from the 3G manual, and it's literally all about pulling pixel maps back out of OpenGL π no cap, it's shorter than it looks, so let's go π«Ά
π NAME π
glGetPixelMapfv, glGetPixelMapuiv, glGetPixelMapusv β return the specified pixel map π
πΈ C SPECIFICATION πΈ
void glGetPixelMapfv( GLenum map,
GLfloat *values )
void glGetPixelMapuiv( GLenum map,
GLuint *values )
void glGetPixelMapusv( GLenum map,
GLushort *values )
π¦ PARAMETERS π¦
mapβ the name of the pixel map you wanna get back, bestie. The accepted values areGL_PIXEL_MAP_I_TO_I,GL_PIXEL_MAP_S_TO_S,GL_PIXEL_MAP_I_TO_R,GL_PIXEL_MAP_I_TO_G,GL_PIXEL_MAP_I_TO_B,GL_PIXEL_MAP_I_TO_A,GL_PIXEL_MAP_R_TO_R,GL_PIXEL_MAP_G_TO_G,GL_PIXEL_MAP_B_TO_B, andGL_PIXEL_MAP_A_TO_A. that's the whole menu, no substitutions π₯valuesβ returns the pixel map contents. it's the lil output bucket, she's giving results β¨
π DESCRIPTION π
okay so, for a full rundown of what's allowed in the map parameter, go check the glPixelMap reference page β that's where the lore lives. glGetPixelMap returns in values the contents of the pixel map you named in map. π
and like, what even are pixel maps for? they get used during the execution of glReadPixels, glDrawPixels, glCopyPixels, glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D, glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D, glCopyTexSubImage2D, glCopyTexSubImage3D, glColorTable, glColorSubTable, glCopyColorTable, glCopyColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D, glSeparableFilter2D, glGetHistogram, glGetMinmax, and glGetTexImage β and what they do there is map color indices, stencil indices, color components, and depth components to other values. that's a lot of functions but they're all just vibing off the same map, iykyk π
if you ask for unsigned integer values, they get linearly mapped from the internal fixed or floating-point representation, in a very specific way: 1.0 maps to the largest representable integer value, and 0.0 maps to 0. π
β οΈ but listen β returned unsigned integer values are undefined if the map value was not in the range [0,1]. not "kinda weird", not "off by a little", undefined. be careful out there π₯Ί
and to figure out how big map needs to be, call glGet with the appropriate symbolic constant. easy π
π NOTES π
if an error gets generated, no change is made to the contents of values. she stays untouched, periodt π
π ERRORS π
GL_INVALID_ENUMis generated ifmapis not an accepted value. (like, she checked the list, you're not on it π)GL_INVALID_OPERATIONis generated ifglGetPixelMapis executed between the execution ofglBeginand the corresponding execution ofglEnd. so don't be doing this mid-glBegin, bestie, that's a whole violation π
π ASSOCIATED GETS π
here's the entire squad of size lookups π«Ά
glGetwith argumentGL_PIXEL_MAP_I_TO_I_SIZEglGetwith argumentGL_PIXEL_MAP_S_TO_S_SIZEglGetwith argumentGL_PIXEL_MAP_I_TO_R_SIZEglGetwith argumentGL_PIXEL_MAP_I_TO_G_SIZEglGetwith argumentGL_PIXEL_MAP_I_TO_B_SIZEglGetwith argumentGL_PIXEL_MAP_I_TO_A_SIZEglGetwith argumentGL_PIXEL_MAP_R_TO_R_SIZEglGetwith argumentGL_PIXEL_MAP_G_TO_G_SIZEglGetwith argumentGL_PIXEL_MAP_B_TO_B_SIZEglGetwith argumentGL_PIXEL_MAP_A_TO_A_SIZEglGetwith argumentGL_MAX_PIXEL_MAP_TABLE
π§ SEE ALSO π§
the whole friend group, go say hi πΈ
glColorSubTable(3G),glColorTable(3G),glConvolutionFilter1D(3G),glConvolutionFilter2D(3G),glCopyColorSubTable(3G),glCopyColorTable(3G),glCopyPixels(3G),glCopyTexImage1D(3G),glCopyTexImage2D(3G),glCopyTexSubImage1D(3G),glCopyTexSubImage2D(3G),glCopyTexSubImage3D(3G),glDrawPixels(3G),glGetHistogram(3G),glGetMinmax(3G),glGetTexImage(3G),glPixelMap(3G),glPixelTransfer(3G),glReadPixels(3G),glSeparableFilter2D(3G),glTexImage1D(3G),glTexImage2D(3G)glTexImage3D(3G),glTexSubImage1D(3G),glTexSubImage2D(3G),glTexSubImage3D(3G)
and that's the whole page, bestie!! π this was GLGETPIXELMAP(3G) from the 3G manual, footer and all β mwah, go forth and map those pixels responsibly πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms