
www.opengl.org/registry ©2009 Khronos Group - Rev. 0809
OpenGL 3.2 API Quick Reference Card
Rasterizaon [3]
Enable/Disable(target)
target: RASTERIZER_DISCARD, MULTISAMPLE
Mulsampling [3.3.1]
Use to analias points, lines, polygons, bitmaps, and images.
Enable/Disable(MULTISAMPLE)
void GetMulsamplefv(enum pname, uint index,
oat *val);
pname: SAMPLE_POSITION
Points [3.4]
void PointSize(oat size);
void PointParameter{if}(enum pname, T param);
void PointParameter{if}v(enum pname, const T params);
pname: POINT_SIZE_MIN, POINT_SIZE_MAX,
POINT_DISTANCE_ATTENUATION POINT_FADE THRESHOLD_SIZE,
POINT_SPRITE_COORD_ORIGIN
param, params: LOWER_LEFT, UPPER_LEFT, pointer to point fade
threshold
Enable/Disable(VERTEX_PROGRAM_POINT_SIZE)
Enable/Disable(POINT_SMOOTH) (Point analias)
Enable/Disable(POINT_SPRITE)
Line Segments [3.5]
void LineWidth(oat width);
Enable/Disable(LINE_SMOOTH) (Line analias)
Other Line Segments Features [3.5.2]
void LineSpple(int factor, ushort paern);
Enable/Disable(LINE_STIPPLE)
Spple Query [6.1.5]
void GetPolygonSpple(void *paern);
Polygons [3.6]
Enable/Disable(POLYGON_STIPPLE)
Enable/Disable(POLYGON_SMOOTH) (Polygon analias)
void FrontFace(enum dir);
dir: CCW, CW
void CullFace(enum mode);
mode: FRONT, BACK, FRONT_AND_BACK
Enable/Disable(CULL_FACE)
Sppling [3.6.2]
void PolygonSpple(ubyte *paern);
Polygon Rasterizaon & Depth Oset [3.6.3] [3.6.4]
void PolygonMode(enum face, enum mode);
face: FRONT, BACK, FRONT_AND_BACK
mode: POINT, LINE, FILL
void PolygonOset(oat factor, oat units);
Enable/Disable(target)
target: POLYGON_OFFSET_POINT, POLYGON_OFFSET_LINE,
POLYGON_OFFSET_FILL
Pixel Rectangles [3.7]
void PixelStore{if}(enum pname, T param);
pname: UNPACK_x (where x may be SWAP_BYTES, LSB_FIRST,
ROW_LENGTH, SKIP_ROWS, SKIP_PIXELS, ALIGNMENT,
IMAGE_HEIGHT, SKIP_IMAGES)
Pixel Transfer Modes [3.7.3]
void PixelTransfer{if}(enum param, T value);
param: MAP_COLOR, MAP_STENCIL, INDEX_SHIFT,
INDEX_OFFSET, x_SCALE, DEPTH_SCALE, x_BIAS,
DEPTH_BIAS, or another value from
[Table 3.2]
void PixelMap{ui us f}v(enum map, sizei size, T values);
map: PIXEL_MAP_{I, S, R, G, B, A}_TO_{I, S, R, G, B, A} [Table 3.3]
Enumerated Queries [6.1.3]
void GetPixelMap{ui us f}v(enum map, T data);
map: PIXEL_MAP_{I, S, R, G, B, A}_TO_{I, S, R, G, B, A} [Table 3.3]
Color Table Specicaon [3.7.3]
void ColorTable(enum target, enum internalformat,
sizei width, enum format, enum type, void *data);
target: {PROXY_}COLOR_TABLE,
POST_CONVOLUTION_COLOR_TABLE,
POST_COLOR_MATRIX_COLOR_TABLE
[Table 3.4]
internalformat: One of the formats in [Table 3.16] or
[Tables 3.17-3.19] except the RED, RG, DEPTH_COMPONENT,
and DEPTH_STENCIL base and sized internal formats in those
tables, all sized internal formats with non-xed internal data
types as discussed in
[3.9], and sized internal format RGB9_E5.
format:
RED, GREEN, BLUE, ALPHA, RG, RGB, RGBA, BGRA,
LUMINANCE, LUMINANCE_ALPHA
type: {UNSIGNED_}BYTE/SHORT/INT*, {HALF_}FLOAT [Table 3.5]
Enable/Disable(POST_COLOR_MATRIX_COLOR_TABLE)
void ColorTableParameter{if}v(enum target, enum pname,
T params);
target: COLOR_TABLE, POST_CONVOLUTION_COLOR_TABLE,
POST_COLOR_MATRIX_COLOR_TABLE
pname: COLOR_TABLE_SCALE, COLOR_TABLE_BIAS
Alternate Color Table Specicaon Commands
void CopyColorTable(enum target, enum internalformat,
int x, int y, sizei width);
void ColorSubTable(enum target, sizei start, sizei count,
enum format, enum type, void *data);
void CopyColorSubTable(enum target, sizei start, int x,
int y, sizei count);
target and pname: see ColorTableParameter{if}v
Color Table Query [6.1.7]
void GetColorTable(enum target, enum format, enum type,
void *table);
target: COLOR_TABLE, POST_CONVOLUTION_COLOR_TABLE,
POST_COLOR_MATRIX_COLOR_TABLE
format and type: See GetTexImage, except format cannot
be DEPTH_COMPONENT
void GetColorTableParameter{if}v(enum target,
enum pname, T params);
target: {PROXY_}COLOR_TABLE,
{PROXY_}POST_CONVOLUTION_COLOR_TABLE,
{PROXY_}POST_COLOR_MATRIX_COLOR_TABLE
pname: COLOR_TABLE_x (where x may be SCALE, BIAS,
FORMAT, COLOR_TABLE_WIDTH, RED_SIZE, GREEN_SIZE,
BLUE_SIZE, ALPHA_SIZE, LUMINANCE_SIZE, INTENSITY_SIZE)
Convoluon Filter Specicaon [3.7.3]
Enable/Disable(POST_CONVOLUTION_COLOR_TABLE)
void ConvoluonFilter2D(enum target, enum
internalformat, sizei width, sizei height, enum format,
enum type,
void *data);
target: CONVOLUTION_2D
internalformat: see ColorTable
format: RED, GREEN, BLUE, ALPHA, RG, RGB, RGBA, BGRA,
LUMINANCE, LUMINANCE_ALPHA, RED_INTEGER, GREEN_INTEGER,
BLUE_INTEGER, ALPHA_INTEGER, RG_INTEGER, RGB_INTEGER,
RBGA_INTEGER, BGR_INTEGER, BGRA_INTEGER
type: {UNSIGNED_}BYTE/SHORT/INT*, {HALF_}FLOAT
void ConvoluonParameter{if}v(enum target, enum pname,
T params);
target: CONVOLUTION_2D
pname: CONVOLUTION_FILTER_SCALE, CONVOLUTION_FILTER_BIAS
void ConvoluonFilter1D(enum target, enum
internalformat, sizei width, enum format, enum type,
void *data);
target: CONVOLUTION_1D
internalformat, format, and type: see ConvoluonFilter2D
void SeparableFilter2D(enum target, enum internalformat,
sizei width, sizei height, enum format, enum type,
void *row, void *column);
target: SEPARABLE_2D
internalformat, format, and type: see ConvoluonFilter2D
Alternate Convoluon Filter Specicaon Commands
void CopyConvoluonFilter2D(enum target,
enum internalformat, int x, int y, sizei width, sizei height);
target: CONVOLUTION_2D
internalformat: see ConvoluonFilter2D
void CopyConvoluonFilter1D(enum target, enum
internalformat, int x, int y, sizei width);
target: CONVOLUTION_1D
internalformat: see ConvoluonFilter2D
Convoluon Query [6.1.8]
void GetConvoluonFilter(enum target, enum format,
enum type, void *image);
target: CONVOLUTION_1D, CONVOLUTION_2D
format and type: See GetTexImage, except format cannot
be DEPTH_COMPONENT
void GetSeparableFilter(enum target, enum format,
enum type, void *row, void *column, void *span);
target: SEPARABLE_2D
format and type: See GetTexImage
void GetConvoluonParameter{if}v(enum target,
enum pname, T params);
target: CONVOLUTION_1D, CONVOLUTION_2D, SEPARABLE_2D
pname: {MAX_}CONVOLUTION_WIDTH,
{MAX_}CONVOLUTION_HEIGHT, CONVOLUTION_x (where x
may be BORDER_COLOR, BORDER_MODE, FILTER_SCALE,
FILTER_BIAS, FORMAT)
Histogram Table Specicaon [3.7.3]
Enable/Disable(HISTOGRAM)
void Histogram(enum target, sizei width,
enum internalformat, boolean sink);
target: HISTOGRAM, PROXY_HISTOGRAM
internalformat: see ColorTable
Histogram Query [6.1.9]
void GetHistogram(enum target, boolean reset,
enum format, enum type, void *values);
target: HISTOGRAM
format and type: See GetTexImage, except format cannot
be DEPTH_COMPONENT
void ResetHistogram(enum target);
target: HISTOGRAM
void GetHistogramParameter{if}v(enum target,
enum pname, T params);
target: HISTOGRAM, PROXY_HISTOGRAM
pname: HISTOGRAM_x (where x may be FORMAT, WIDTH, RED_SIZE,
GREEN_SIZE, BLUE_SIZE, ALPHA_SIZE, LUMINANCE_SIZE, SINK)
Minmax Table Specicaon [3.7.3]
Enable/Disable(MINMAX)
void Minmax(enum target, enum internalformat,
boolean sink);
target: MINMAX
internalformat: see ColorTable, except INTENSITY base and
sized internal formats
Minmax Query [6.1.10]
void GetMinmax(enum target, boolean reset,
enum format, enum type, void *values);
target: MINMAX
format and type: See GetTexImage, except format cannot
be DEPTH_COMPONENT
void ResetMinmax(enum target);
target: MINMAX
void GetMinmaxParameter{if}v(enum target,
enum pname, T params);
target: MINMAX
pname: MINMAX_FORMAT, MINMAX_SINK
Rasterizaon of Pixel Rectangles [3.7.5]
void DrawPixels(sizei width, sizei height, enum format,
enum type, void *data);
format: {COLOR|STENCIL}_INDEX, DEPTH_COMPONENT,
DEPTH_STENCIL, RED, GREEN, BLUE, ALPHA, RG, RGB, RGBA,
BGR, BGRA, LUMINANCE{_ALPHA}
[Table 3.6]
(*_INTEGER formats are not supported)
type: UNSIGNED_BYTE, BITMAP, BYTE, UNSIGNED_SHORT, SHORT,
UNSIGNED_INT, INT, HALF_FLOAT, FLOAT, or another value from
[Table 3.5]
void ClampColor(enum target, enum clamp);
target: CLAMP_READ_COLOR, CLAMP_FRAGMENT_COLOR
clamp: TRUE, FALSE, FIXED_ONLY
void PixelZoom(oat zx, oat zy);
Pixel Transfer Operaons [3.7.6]
void ConvoluonParameter{if}(enum target,
enum pname, T param);
target: CONVOLUTION_1D, CONVOLUTION_2D, SEPARABLE_2D
pname: CONVOLUTION_BORDER_MODE
param: REDUCE, CONSTANT_BORDER, REPLICATE_BORDER
Bitmaps [3.8]
void Bitmap(sizei w, sizei h, oat xb0, oat yb0, oat xbi,
oat ybi, ubyte *data);
Texturing [3.8] [3.9]
void AcveTexture(enum texture);
texture: TEXTUREi (where i is
[0, MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1])
Texture Image Specicaon [3.8.1] [3.9.1]
void TexImage3D(enum target, int level, int internalformat,
sizei width, sizei height, sizei depth, int border,
enum format, enum type, void *data);
target: {PROXY_}TEXTURE_3D, {PROXY_}TEXTURE_2D_ARRAY
internalformat: ALPHA, DEPTH_COMPONENT, DEPTH_STENCIL,
LUMINANCE, LUMINANCE_ALPHA, INTENSITY, RED, RG, RGB,
RGBA; a sized internal format from
[Tables 3.12-3.13]
[Tables 3.17-3.19]
; COMPRESSED_RED_RGTC1,
COMPRESSED_SIGNED_RED_RGTC1, COMPRESSED_RG_RGTC2,
COMPRESSED_SIGNED_RG_RGTC2, or a generic compressed
format from
[Table 3.14] [Table 3.20]
format: COLOR_INDEX, DEPTH_COMPONENT, DEPTH_STENCIL, RED,
GREEN, BLUE, ALPHA, RG, RGB, RGBA, BGR, BGRA, LUMINANCE,
LUMINANCE_ALPHA, RED_INTEGER, GREEN_INTEGER,
BLUE_INTEGER, ALPHA_INTEGER, RG_INTEGER, RGB_INTEGER,
RGBA_INTEGER, BGR_INTEGER, BGRA_INTEGER, or one of the
values from
[Table 3.5] [Table 3.8]
type: UNSIGNED_BYTE, BITMAP, BYTE, UNSIGNED_SHORT, SHORT,
UNSIGNED_INT, INT, HALF_FLOAT, FLOAT, or a value from
[Table 3.5]
void TexImage2D(enum target, int level, int internalformat,
sizei width, sizei height, int border, enum format,
enum type, void *data);
target: {PROXY_}TEXTURE_2D, {PROXY_}TEXTURE_1D_ARRAY,
{PROXY_}TEXTURE_RECTANGLE, TEXTURE_CUBE_MAP_*,
PROXY_TEXTURE_CUBE_MAP
internalformat, format, and type: See TexImage3D
void TexImage1D(enum target, int level, int internalformat,
sizei width, int border, enum format, enum type,
void *data);
target: TEXTURE_1D, PROXY_TEXTURE_1D
type: UNSIGNED_BYTE, BITMAP, BYTE, UNSIGNED_SHORT, SHORT,
UNSIGNED_INT, INT, HALF_FLOAT, FLOAT, or another value from
[Table 3.2] [Table 3.5]
internalformat and format: See TexImage3D
Alt. Texture Image Specicaon Commands [3.8.2] [3.9.2]
void CopyTexImage2D(enum target, int level,
enum internalformat, int x, int y, sizei width, sizei height,
int border);
target: TEXTURE_2D, TEXTURE_1D_ARRAY, TEXTURE_RECTANGLE,
TEXTURE_CUBE_MAP*
internalformat: See TexImage2D
void CopyTexImage1D(enum target, int level,
enum internalformat, int x, int y, sizei width, int border);
target: TEXTURE_1D
internalformat: See TexImage1D
(Connued >)