[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glPixelZoom Subroutine


Specifies the pixel zoom factors.


OpenGL C bindings library: libGL.a

C Syntax

void glPixelZoom(GLfloat xFactor, 
    GLfloat yFactor)


xFactor and yFactor Specify the x and y zoom factors for pixel write operations.



The glPixelZoom subroutine specifies values for the x and y zoom factors. During the execution of the glDrawPixels or glCopyPixels subroutines, 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

(xr +  xFactor, yr +  yFactor) 


(xr + (n+1)  xFactor, yr + (m+1)  yFactor)

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.


GL_INVALID_OPERATION The glPixelZoom subroutine is called between a call to glBegin and the corresponding call to glEnd.

Associated Gets

Associated gets for the glPixelZoom subroutine are as follows. (See the glGet subroutine for more information.)

glGet with argument GL_ZOOM_X

glGet with argument GL_ZOOM_Y.


Contains C language constants, variable type definitions,
and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glCopyPixels subroutine, glDrawPixels subroutine.

OpenGL Overview.

[ Previous | Next | Contents | Glossary | Home | Search ]