GLPIXELZOOM(3G)

πŸ“¦ version 1.1, in centos-stream 9, fedora 43, fedora 44

πŸ’– NAME πŸ’–

glPixelZoom β€” bestie, this is the one that sets your pixel zoom factors ✨ like it literally just says "specify the pixel zoom factors" and that's the whole vibe πŸŽ€

This lil guy lives in the 3G manual, and its name up top is GLPIXELZOOM, lowercase in code, all caps in the header, iykyk πŸ’…


🌸 C SPECIFICATION 🌸

void glPixelZoom( GLfloat xfactor,
                  GLfloat yfactor )

no cap, that's the whole signature 🫢


✨ PARAMETERS ✨

  • xfactor, yfactor β€” these two cuties specify the x and y zoom factors for pixel write operations. so like, how much you're stretching the pixels when you write them. that's it, that's the job πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so glPixelZoom specifies values for the x and y zoom factors. simple.

now here's the part that's giving main character energy. during the execution of glDrawPixels or glCopyPixels, if (xr, yr) is the current raster position, and a given element is in the *m*th row and *n*th column of the pixel rectangle, then pixels whose centers are in the rectangle with corners at

(xr+nβ‹…xfactor, yr+mβ‹…yfactor)

(xr+(n+1)β‹…xfactor, yr+(m+1)β‹…yfactor)

are candidates for replacement. πŸ’« and like, any pixel whose center lies on the bottom or left edge of this rectangular region is also modified. yes, even the edge ones. they're included, periodt.

and listen β€” pixel zoom factors are not limited to positive values. negative zoom factors reflect the resulting image about the current raster position. so you can absolutely flip the whole thing, it's iconic, it's art 🌈


πŸ’€ ERRORS πŸ’€

GL_INVALID_OPERATION is generated if glPixelZoom is executed between the execution of glBegin and the corresponding execution of glEnd. πŸ™ˆ so do NOT try to sneak it in there, bestie, it will not slay, it will error out on you.

πŸŽ€ ASSOCIATED GETS πŸŽ€

you can peek at these values with:

  • glGet with argument GL_ZOOM_X
  • glGet with argument GL_ZOOM_Y

🌟 SEE ALSO 🌟

  • glCopyPixels(3G)
  • glDrawPixels(3G)

and that's the whole page fr fr πŸ“ this was GLPIXELZOOM from the 3G manual β€” same name top and bottom, GLPIXELZOOM(3G), living rent free in your terminal forever πŸ’–βœ¨πŸ«Ά no date drama, just the page name and the manual section, and honestly? iconic. bye bestie πŸ‘‘πŸ’…

πŸ“¦ where this page comes from