OpenGL API function User's Manual

Source: Internet
Author: User
Tags types of functions

A OpenGL function Library

Format:

< library prefix >< root command >< optional number of parameters >< optional parameter types > library prefixes include GL, glu, aux, Glut, WGL, GLX, AGL, and more.

1, the core function library can be divided into the following types of functions

(1) Draw the basic geometric entity function. such as: Glbegain ().

(2) Functions of matrix operations, geometric transformations, and projection transformations. such as: Matrix into the stack Glpushmatrix (), there is the matrix of the stack, reprint, multiplication, in addition to the geometric transformation function gltranslate* (), the Projection transformation function Glortho () and the Viewport transformation function glviewport () and so on.

(3) color, illumination and material functions.

(4) Display list functions, which include functions Glnewlist (), Glendlist (), glgenlists (), gldeletelists (), and glcalllist () that create, end, generate, delete, and invoke display lists.

(5) Texture mapping function, mainly has one and two dimensional texture function, set the texture parameters, texture environment and texture coordinates function gltexparameter* (), gltexenv* () and gltetcoord* () and so on.

(6) Special effect function.

(7) Selection and feedback function.

(8) Drawing function of curves and surfaces.

(9) State setting and query function.

(10) Rasterization, pixel function.

2. OpenGL Utility Repository (the OpenGL Utility Library) (GLU)

Contains 43 functions, and the name of the function is prefixed with the name Glu.

(1) Auxiliary texture mapping function.

(2) Coordinate transformation and projection transformation function.

(3) Polygon Mosaic tool.

(4) Two-time surface drawing tool.

(5) Non-uniform rational B-spline drawing tool.

(6) Error Feedback tool, get error message string gluerrorstring ()

3. OpenGL Auxiliary Library

Contains 31 functions with the function name prefix named aux

This part of the function provides window management, input and output processing, and drawing some simple three-dimensional objects.

4. OpenGL Tool Library (OpenGL Utility Toolkit)

Contains approximately 30 functions, the function prefix named Glut, which is the function of Glut.dll to interpret execution.

(1) Window operation function. Functions such as window initialization, window size, window position, etc. glutinit () Glutinitdisplaymode (), Glutinitwindowsize () glutinitwindowposition (), and so on.

(2) callback function. Respond to refresh messages, keyboard messages, mouse messages, timer functions, etc., Glutdisplayfunc (), Glutpostredisplay (), Glutreshapefunc (), Gluttimerfunc (), Glutkeyboardfunc (), Glutmousefunc ().

(3) Create complex three-dimensional objects. These are the same functions as the AUX library functions. such as creating a sphere glutwiresphere ().

(4) Function menu

(5) Program run function Glutattachmenu ()

5, 16 WGL functions, specifically for OpenGL and Windows window System joins, whose prefix name is WGL

(1) Draw the context function. Wglcreatecontext (), Wgldeletecontext (), Wglgetcurrentcontent (), WGLGETCURRENTDC () wgldeletecontent (), etc.

(2) Text and text processing functions. Wglusefontbitmaps (), Wglusefontoutlines ().

(3) covering layer, stratum and main plane processing function. Wglcopycontext (), Wglcreatelayerplane (), Wgldescribelayerplane (), Wglreakizelayerplatte (), etc.

(4) Other functions. Wglsharelists (), wglgetprocaddress () and so on.

(ii) Function library List 1, OpenGL application function library

Glubegincurve,gluendcurve defines a rational nurbs curve that is inconsistent
Glubeginpolygon,gluendpolygon defines a non-convex polygon
Glubeginsurface,gluendsurface Defining a NURBS curve
Glubegintrim,gluendtrim defining a NURBS collation cycle
Glubuild1dmipmaps building a one-dimensional multi-mapping
Glubuild2dmipmaps establishing two-dimensional multiple mappings
Glucylinder Draw a cylinder
Gludeletenurbsrenderer Deleting a NURBs object
Gludelequadric Delete a two-time surface object
Gludeletetess Deleting a Mosaic object
Gludisk Draw a Plate
Gluerrorstring generating an error string based on OpenGL or Glu error codes
Glugetnutbsproperty Get a NURBS attribute
Glugetstring get a string that describes the Glu version number or supports Glu extension calls
Glugettessproperty Get a Mosaic object
Gluloadsamplingmatrices Loading numrbs examples and select matrices
Glulookat Setting a transform viewpoint
Glunewnurbsrenderer Creating a NURBs Object
Glunewquadric creating a two-time surface object
Glunewtess Creating a Mosaic object
Glunextcontour marks the beginning of other outlines
Glunurbscallback setting a callback for a NURBs object
Glunnrbscurve setting the shape of a NURBS curve
Glunurbsproperty Setting a NURBs property
Glunurbssurface defines the shape of a nurbs surface
Gluortho2d defining a two-bit orthogonal projection matrix
Glupartialdisk draw an arc of a plate
Gluperspective setting a Perspective projection matrix
Glupickmatrix Define a pickup interval
Gluproject mapping object coordinates to window coordinates
Glupwlcurve describes a piecewise linear nurbs clipping curve
Gluquadriccallback defining a callback for a two-time surface object
Gluquadricdrawstyle set the appropriate drawing style for two-times surfaces
Gluquadricnormals defines the kind of normal used for two-second surfaces
Gluquadricorientation defining the inner or outer direction of a two-second surface
Gluquadrictexture defines whether to take two times its polygon to make a texture post map
Gluscaleimage transform images to any size
Glusphere Draw a Sphere
Glutessbegincontour,glutessendcontour Delimit a boundary description
Glutessbeginpolygon,glutessendpolygon Delimit a polygon description
Glutesscallback defining a callback for a mosaic object
Glutessnormal for a multilateral line-shape definition method
Glutessproperty setting the properties of a mosaic object
Glutessvertex the vertices defined on a polygon
Gluunproject Mapping window coordinates to object coordinates

2. OpenGL Core Function Library

Glaccum Operation Additive Buffers
Gladdswaphintrectwin defines a set of triangles that are swapbuffers copied glalphafunc allow Alpha detection to be set
Glaretexturesresident determines whether a particular texture object resides in texture memory

Glarrayelement defines a number of component parts that are used for vertex rendering glbegin,glend define one or a set of original vertices
Glbindtexture allows you to create a named texture that is bound to a target texture Glbitmap draw a bitmap

Glblendfunc Special pixel algorithm
Glcalllist Performing a display list
Glcalllists performing a list of displayed columns
Glclear clearing buffers with current values
GLCLEARACCUM Specifies the value to purge for the add-in buffer glclearcolor specifies the value for the color buffer to clear glcleardepth for the depth buffer specifies the value to use for purging Glclearstencil for the template buffer to specify a value for purging Glclipplane defines a planar geometry that is clipped glcolor set the current color

Glcolormask allow or disallow write color component frame buffers
Glcolormaterial make a material color point to the current color
Glcolorpointer defining a column of colors
Glcolortableext defines the format and dimensions of a palette texture for a palette glcolorsubtableext the portion of the palette that defines the destination texture is replaced glcopypixels pixels in the copy frame buffer

glcopyteximage1d copies pixels from the frame buffer into a single-space texture image glcopyteximage2d copies pixels from the frame buffer into a two-dimensional texture image glcopytexsubimage1d Copy a sub-image of a single-space texture from the frame buffer glcopytexsubimage2d copy a sub-image of a two-dimensional texture from the frame buffer Glcullface defines whether front or back can be selected

Gldeletelists Delete an adjacent set of display lists

Gldeletetextures Delete a named texture
Gldepthfunc defining data for deep buffer comparisons

Gldepthmask allows or does not allow write depth buffers

Gldepthrange define Z-values from standard device coordinates to window coordinates gldrawarrays define render multiple entities Gldrawbuffer define which color buffer is drawn gldrawelements the elements in the rendered array data
Gldrawpixels writes a group of pixels to the frame buffer
Gledgeflag defines an array of edge flags
Gledgeflagpointer defines an array of edge flags
Glenable, gldisable turn on or off the special features of OpenGL glenableclientstate,gldisableclientstate turn on or off the array Glevalcoord solve one and two-dimensional maps respectively

Glevalmesh1,glevalmesh2 the generation and solution of grid glevalpoint1,glevalpoint2 for one and two-dimensional points or lines a single point Glfeedbackbuffer control feedback mode in a grid
Glfinish wait until OpenGL execution ends

Glflush forcing OpenGL execution for a limited time

Glfogf,glfogi,glfogfv,glfogiv Defining Fog Parameters
Glfrontface defining the front and back of a polygon
Glfrustum current matrix multiply on perspective matrix
Glgenlists generating a set of empty, contiguous display lists
Glgentextures Generating a texture name

Glgetbooleanv,glgetdoublev,glgetfloatv,glgetintegerv return value or selected parameter value Glgetclipplane returns the coefficient of a specific cut face

Glgetcolortableext The color table data from the current target texture palette glgetcolortableparameterfvext,glgetcolortableparameterivext Get palette parameters from the color table
Glgeterror return error message
Glgetlightfv,glgetlightiv return the light parameter value GLGETMAPDV,GLGETMAPFV,GLGETMAPIV return the evaluation program parameter

Glgetmaterialfv,glgetmaterialiv returns the material parameter GLGETPIXELMAPFV,GLGETPIXELMAPUIV,GLGETPIXELMAPUSV returns a specific pixel figure glGetPointerv Returns the address of the vertex data array
Glgetpolygonstipple returns the dot pattern of the polygon
Glgetstring returns a string describing the current OpenGl connection
GLGETTEXENVFV Return Texture Environment parameters

Glgettexgendv,glgettexgenfv,glgettexgeniv returns the texture coordinate generation parameter glgetteximage returns a texture image GLGETTEXLEVELPARAMETERFV, Glgettexlevelparameteriv returns the level of detail for a specific texture parameter
GLGETTEXPARAMETERFV,GLGETTEXPARAMETERIV return Texture parameter values
Glhint definition to implement special clues
Glindex creating the current color index
Glindexmask Control writes the individual bits in the color index buffer
Glindexpointer Defining a color index array
Glinitname Initializing the name stack
Glinterleavedarrays also defines and allows several alternating arrays in a large array glisenabled to define whether performance is allowed
Glislist detecting the presence of a display list
Glistexture determine a name that corresponds to a texture
Gllightf,gllighti,gllightfv,gllightiv setting light source parameters Gllightmodelf,gllightmodeli,gllightmodelfv,gllightmodeliv setting Ray model parameters Gllinestipple set line point drawing case
Gllinewidth Setting the width of the grating segment
Gllistbase setting the base of the display list for glcalllist
Glloadidentity replacing the current matrix with an identity matrix
Glloadmatrixd,glloadmatrif Replace the current matrix with an arbitrary matrix
Glloadname a name into the name stack
Gllogicop defining a logical pixel operation for color index rendering
GLMAP1D,GLMAP1F define a one-dimensional evaluation procedure
GLMAP2D,GLMAP2F define a two-dimensional evaluation program GLMAPGRID1D,GLMAPGRID1F,GLMAPGRID2D,GLMAPGRID2F define a one-dimensional or two-dimensional grid
Glmaterialf,glmateriali,glmateriafv,glmaterialiv define the material parameters for the lighting model Glmatrixmode define which matrix is the current matrix

GLMULTMATRIXD,GLMULTMATRIXF multiply with any matrix with the current matrix

Glnewlist,glendlist Create or replace a display list
Glnormal Setting the current vertex method

Glnormalpointer setting a normal array

Glortho multiplication with the current matrix with a vertical matrix
Glpassthrough in the feedback buffer glpixelmapfv,glpixelmapuiv,glpixelmapusv set the pixel switch diagram Glpixelstoref,glpixelstorei set the pixel storage mode
Glpixeltransferf,glpixeltransferi Setting the pixel storage mode
Glpixelzoom setting pixel scaling factor
Glpointsize setting the diameter of the grating point
Glpolygonmode Selecting a polygon's raster mode
Glpolygonoffset setting the scale and unit of OpenGL for calculating depth values
Glpolygonstipple Setting the Polygon fill pattern
Glprioritizetextures setting priority for texture pinning
The Glpushattrib,glpopattrib property stack's push-in and eject operations Glpushclientattrib,glpopclientattrib store and restore customer status values Glpushmatrix in the Customer property stack, Glpopmatrix and eject operations of the matrix stack glpushname,glpopname the name Stack's push-in and eject operations
Glrasterpos defines the raster position of the pixel operation
Glreadbuffer Selecting a source color buffer for pixels
Glreadpixels reading a set of data from the frame buffer glrectd,glrectf,glrecti,glrects,glrectdv,glrectfv,glrectiv,glrectsv draw a triangle
Glrendermode Defining a raster pattern
Glrotated,glrotatef multiplies the rotation matrix with the current matrix
Glscaled,glscalef multiplying a general scale matrix with the current matrix
Glscissor Defining a cut box
Glselectbuffer creating a buffer for the selection mode value
Glshademodel Select straight or smooth shading
Glstencilfunc setting functions and reference values for a template test
Glstencilmask control to write individual bits on the stencil face
Glstencilop Setting the activation mode test
Gltexcoord setting the current texture coordinates
Gltexcoordpointer defines a texture coordinate array gltexenvf,gltexenvi,gltexenvfv,gltexenviv set the texture coordinate environment parameter GLTEXGEND,GLTEXGENF,GLTEXGENDV, Gltexgenfv,gltexgeniv control of texture coordinates generation GLTEXIMAGE1D defines a one-dimensional texture image
Glteximage2d define a two-dimensional texture map Gltexparameterf,gltexparameteri,gltexparameterfv,gltexparameteriv set Texture parameters
GLTEXSUBIMAGE1D defines a part of an existing one-dimensional texture image, but cannot define a new texture gltexsubimage2d defines a part of an existing two-dimensional texture image, but cannot define a new texture Gltranslated,gltranslatef Multiplies the transformation matrix by the current matrix Glvertex defines a vertex
Glvertexpointer setting a vertex data array
Glviewport Settings window

OpenGL API function User's Manual

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.