The glPixelZoom function specifies the pixel zoom factors.
void glPixelZoom(
GLfloat xfactor,
GLfloat yfactor
);
The glPixelZoom function specifies values for the x and y zoom factors. During the execution of glDrawPixels or glCopyPixels, if (x (r) , y (r) ) is the current raster position, and a given element is in the nth row and mth column of the pixel rectangle, then pixels whose centers are in the rectangle with corners at
are candidates for replacement. Any pixel whose center lies on the bottom or left edge of this rectangular region is also modified.
Pixel zoom factors are not limited to positive values. Negative zoom factors reflect the resulting image about the current raster position.
The following functions retrieve information related to glPixelZoom:
glGet with argument GL_ZOOM_X
glGet with argument GL_ZOOM_Y
The following are the error codes generated and their conditions.
Error Code | Condition |
---|---|
GL_INVALID_OPERATION | glPixelZoom was called between a call to glBegin and the corresponding call to glEnd. |
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in gl.h.
Import Library: Link with opengl32.lib.
glBegin, glCopyPixels, glDrawPixels, glEnd