glPixelZoom

The glPixelZoom function specifies the pixel zoom factors.

void glPixelZoom(
  GLfloat xfactor,  GLfloat yfactor);

Parameters

  • xfactor, yfactor
    The x and y zoom factors for pixel write operations.

Remarks

The glPixelZoom function specifies values for the x and y zoom factors. During the execution of glDrawPixels or glCopyPixels, if (xr,yr) 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

Error Codes

The following is the error code and its condition.

Error code Condition
GL_INVALID_OPERATION glPixelZoom was called between a call to glBegin and the corresponding call to glEnd.

Requirements

**  Windows NT/2000:** Requires Windows NT 3.5 or later.
**  Windows 95/98:** Requires Windows 95 or later. Available as a redistributable for Windows 95.
**  Header:** Declared in Gl.h.
**  Library:** Use Opengl32.lib.

See Also

glBegin, glCopyPixels, glDrawPixels, glEnd