You are on page 1of 9

OpenGL Function Calls

         

void glBegin (GLenum mode) void glEdgeFlag (GLboolean flag) void glEdgeFlagv (const GLboolean *flag) void glEnd (void) extern void glPolygonOffset (GLfloat factor, GLfloat units) void glRect (TYPE x1, TYPE y1, TYPE x2, TYPE y2) void glRectv (const TYPE *v1, const TYPE *v2) void glVertex2 (TYPE x, TYPE y) void glVertex3 (TYPE x, TYPE y, TYPE z) void glVertex4 (TYPE x, TYPE y, TYPE z, TYPE w)

Vertex Arrays
           

extern void glArrayElement (GLint i) extern void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) extern void glDisableClientState (GLenum array) extern void glDrawArrays (GLenum mode, GLint first, GLsizei count) extern void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) extern void glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer) extern void glEnableClientState (GLenum array) extern void glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer) extern void glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer) extern void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer) extern void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) extern void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)

Coordinate Transformation
      

void glDepthRange (GLclampd near, GLclampd far) void glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) void glLoadIdentity (void) void glLoadMatrix (const TYPE *m) void glMatrixMode (GLenum mode) void glMultMatrix (const TYPE *m) void glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)

TYPE param) void glNormal3 (TYPE nx. TYPE z. TYPE param) void glMaterial (GLenum face. TYPE *params) void glIndex (TYPE index) void glLight (GLenum light. GLushort pattern) void glLineWidth (GLfloat width) void glPointSize (GLfloat size) void glPolygonMode (GLenum face. GLenum mode) void glFrontFace (GLenum dir) void glGetLight (GLenum light. GLsizei height. GLenum format. TYPE green. GLsizei height) Coloring and Lighting             void glColor3 (TYPE red. GLfloat xorig. TYPE x. TYPE y. GLsizei keight. TYPE blue. GLfloat ymove. TYPE green. GLenum pname. TYPE w) Pixel Operations     void glCopyPixels (GLint x. TYPE z) void glTranslate (TYPE x. GLenum pname. GLint mapsize. TYPE ny. GLenum type) void glDrawPixels (GLsizei width. GLenum pname. GLfloat xmove. GLenum pname. TYPE z) void glRasterPos4 (TYPE x. TYPE blue) void glColor4 (TYPE red. TYPE alpha) void glColorMaterial (GLenum face. GLsizei width. GLsizei width. const TYPE *values) . TYPE nz) void glShadeModel (GLenum mode) Clipping   void glClipPlane (GLenum plane. TYPE z) void glScale (TYPE x. GLsizei keight. TYPE y. TYPE y. GLfloat yorig. TYPE z) void glViewport (GLint x. GLint y. TYPE *values) void glPixelMap (GLenum map. GLenum type. GLint y. const GLubyte *bitmap) void glCullFace (GLenum mode) void glGetPolygonStipple (GLubyte *mask) void glLineStipple (GLint factor. const GLvoid *pixels) void glGetPixelMap (GLenum map. TYPE *params) void glGetMaterial (GLenum face. const GLdouble *equation) void glGetClipPlane (GLenum plane. TYPE param) void glLightModel (GLenum pname.      void glPopMatrix (void) void glPushMatrix (void) void glRotate (TYPE angle. TYPE y. TYPE y) void glRasterPos3 (TYPE x. GLdouble *equation) Rasterization            void glBitmap (GLsizei width. GLenum mode) void glPolygonStipple (const GLubyte *mask) void glRasterPos2 (TYPE x. TYPE y.

GLint border) void glDeleteTextures (GLsizei n. GLint xoffset. TYPE t. const GLvoid *pixels) void glTexSubImage2D (GLenum target. GLenum internalFormat. GLint level. GLint level. GLenum format. GLenum type. GLint x. GLint y. GLenum pname. GLenum pname. TYPE t. GLsizei height. TYPE param) void glPixelZoom (GLfloat xfactor. GLint level. GLvoid *pixels) Textures                           GLboolean glAreTexturesResident (GLsizei n. GLenum format. GLuint texture) void glCopyTexSubimage1D (GLenum target. GLenum pname. GLenum pname. GLint leve'l. GLenum type. GLenum pname. GLint y. GLint level. GLint yoffset. TYPE param) void glTexGen (GLenum coord. GLenum type. GLsizei width. TYPE r) void glTexCoord4 (TYPE s. GLfloat yfactor) void glReadBuffer (GLenum mode) void glReadPixels (GLint x. GLint level. TYPE t) void glTexCoord3 (TYPE s. GLsizei width) void glCopyTexSubimage2D (GLenum target.     void glPixelStore (GLenum pname. const GLuint *textures. GLint x. GLsizei width. TYPE param) void glPixelTransfer (GLenum pname. TYPE *params) void glGetTexGen (GLenum coord. TYPE *params) void glGetTexParameter (GLenum target. GLint xoffset. const GLvoid *pixels) . GLenum pname. GLenum format. GLenum format. GLint border. GLboolean *residences) void glBindTexture (GLenum target. const GLuint *textures. GLenum type. TYPE q) void glTexEnv (GLenum target. GLint level. GLenum type. GLint xoffset. GLint x. GLint level. const GLvoid *pixels) void glTexParameter (GLenum target. TYPE param) void glTexImage1D (GLenum target. GLenum format. const GLclampf *priorities) void glTexCoord1 (TYPE s) void glTexCoord2 (TYPE s. GLint components. GLint yoffset. GLsizei width. GLint level. TYPE r. GLint border) void glCopyTeximage2D (GLenum target. GLint y. GLsizei height. GLvoid *pixels) void glIsTexture (GLuint texture) void glPrioritizeTextures (GLsizei n. GLenum format. TYPE param) void glTexSubImage1D (GLenum target. GLsizei height. const GLuint *textures) void glGenTextures (GLsizei n. GLuint *textures) void glGetTexEnv (GLenum target. GLenum internalFormat. TYPE *params) void glGetTexLevelParameter (GLenum targrt. const GLvoid *pixels) void glTexImage2D (GLenum target. GLsizei width. GLint. GLsizei width. GLsizei width. GLenuni pname. TYPE *params) void glGetTeximage (GLenum target. GLint components. GLint GLsizei v. GLint xoffset. GLsizei height. GLint x. GLint border. GLenum type. GLint level. GLsizei height) void glCopyTeximage1D (GLenum target. GLsizei width.

GLboolean green. GLfloat blue. TYPE v1. GLint ustride. GLint i1. GLuint mask) void glStencilMask (GLuint mask) void glStencilOp (GLenum fail. const TYPE *points) void glMapGrid1 (GLint n. TYPE v) void glEvalMesh1 (GLenum mode. GLboolean alpha) void glDepthFunc (GLenum func) void glDepthMask (GLboolean flag) void glDrawBuffer (GLenum mode) void glIndexMask (GLuint mask) void glLogicOp (GLenum opcode) void glScissor (GLint x. GLfloat green. GLint vstride. GLint stride. GLint i2) void glEvalMesh2 (GLenum mode. TYPE v2. GLenum dfactor) void glClear (GLbitfield mask) void glClearAccum (GLfloat red. GLint j1. GLint j2) void glEvalPoint1 (GLint i) void glEvalPoint2 (GLint i. TYPE param) Frame Buffer Operations                    void glAccum (GLenum op. TYPE *v) void glMap1 (GLenum target. GLint vn. GLclampf blue. GLenum zpass) Evaluators            void glEvalCoord1 (TYPE u) void glEvalCoord2 (TYPE u. TYPE v2) Selection and Feedback   void glFeedbackBuffer (GLsizei size. GLint j) void glGetMap (GLenum target. GLsizei height) void glStencilFunc (GLenum func. GLclampf alpha) void glClearDepth (GLclampd depth) void glClearIndex (GLfloat c) void glClearStencil (GLint s) void glColorMask ( GLboolean red. GLenum type. GLenum pass. GLboolean blue. TYPE u2. GLenum query. GLint order. GLint i2. GLint vorder. TYPE u1. TYPE u1. TYPE u2.Fog  void glFog (GLenum pname. TYPE v1. GLclampf ref) void glBlendFunc (GLenum sfactor. GLsizei width. GLfloat value) void glAlphaFunc (GLenum func. const TYPE *points) void glMap2 (GLenum target. GLint ref. GLint i1. TYPE u1. GLint uorder. TYPE u2) void glMapGrid2 (GLint un. GLfloat *buffer) void glInitNames (void) . GLint y. GLclampf green. GLfloat alpha) void glClearColor ( GLclampf red. TYPE u2. TYPE u1.

GLsizei range) void glEndList (void) GLuint glGenLists (GLsizei range) GLboolean glIsList (GLuint list) void glListBase (GLuint base) void glNewList (GLuint list. GLfloat *params) void glGetIntegerv (GLenum pname. glAddSwapHintRectWIN Specifies a set of rectangles that are to be copied by SwapBuffers. 4. in alphabetical order are presented here. 3. glAreTexturesResident Determines whether specified texture objects are resident in texture memory. const GLvoid *lists) void glDeleteLists (GLuint list. 5. 2. Each reference page describes one or more function. glAccum Operates on the accumulation buffer. Function Description 1. GLenum mode) Modes and Execution       void glDisable (GLenum cap) void glEnable (GLenum cap) void glFinish (void) void glFlush (void) void glHint (GLenum target. GLuint *buffer) Display Lists         void glCallList (GLuint list) void glCallLists (GLsizei n. GLdouble *params) GLenum glGetError (void) void glGetFloatv (GLenum pname. GLboolean *params) void glGetDoublev (GLenum pname. glAlphaFunc Enables your application to set the alpha test function. GLenum type. .      void glLoadName (GLuint name) void glPassThrough (GLfloat token) void glPopName (void) void glPushName (GLuint name) GLint glRenderMode (GLenum mode) void glSelectBuffer (GLsizei size. glArrayElement Specifies the array elements used to render a vertex. See also GLU Functions. GLenum mode) GLboolean glIsEnabled (GLenum cap) State Queries         void glGetBooleanv (GLenum pname. GLint *params) const GLubyte *glGetString (GLenum name) void glPopAttrib (void) void glPushAttrib (GLbitfield mask) The OpenGL commands.

14. glColorMask Enables and disables writing of frame-buffer color components. glEvalCoord functions Evaluate enabled one. glDrawArrays Specifies multiple primitives to render. 29.and two-dimensional maps. glBlendFunc Specifies pixel arithmetic. 16. 34. 36. 33. glClearAccum Specifies the clear values for the accumulation buffer. 20. 10. 38. 37. glClearDepth Specifies the clear value for the depth buffer. 42. glEvalMesh functions Compute a one. 26. glDeleteLists Deletes a contiguous group of display lists. 41. glColorMaterial Causes a material color to track the current color. glCopyTexSubImage2D Copies a sub-image of a two-dimensional texture image from the framebuffer. glEnableClientState. glClearIndex Specifies the clear value for the color-index buffers. glDepthFunc Specifies the value used for depth-buffer comparisons. 35. glCallList Executes a display list. 19. glCopyPixels Copies pixels in the framebuffer. glDepthMask Enables or disables writing into the depth buffer. glDrawElements Renders primitives from array data. glBindTexture Enables the creation of a named texture that is bound to a texture target. glClearColor Specifies clear values for the color buffers. glCopyTexImage2D Copies pixels from the framebuffer into a two-dimensional texture image. glClearStencil Specifies the clear value for the stencil buffer. 22. 45. 23. 7. 24. glColorTableEXT Specifies the format and size of a palette for targeted paletted textures. glEdgeFlagPointer Defines an array of edge flags. glColorSubTableEXT Specifies a portion of the targeted texture's palette to be replaced. glDepthRange Specifies the mapping of z values from normalized device coordinates to window coordinates. glEdgeFlag functions Define an array of edge flags. 43. 28. glColorPointer Defines an array of colors. 32. glCopyTexImage1D Copies pixels from the framebuffer into a one-dimensional texture image. glCullFace Specifies whether front. glDrawPixels Writes a block of pixels to the framebuffer. 13. 15. glBitmap Draws a bitmap. glDrawBuffer Specifies which color buffers are to be drawn into. 39. glColor functions Set the current color. glClipPlane Specifies a plane against which all geometry is clipped. 8. 44. glEnable. 17. 12. 25.or back-facing facets can be culled. glClear Clears buffers to preset values. glDisable Enables or disables OpenGL capabilities. glDisableClientState Enables and disables arrays. 27. glDeleteTextures Deletes named textures.6. 31. glCopyTexSubImage1D Copies a sub-image of a one-dimensional texture image from the framebuffer. . 9. glEnd Delimit the vertices of a primitive or a group of like primitives. 11. glBegin. glCallLists Executes a list of display lists. 40. respectively.or two-dimensional grid of points or lines. 30. 21. 18.

83. 52. 49. glGetTexImage Retrieves a texture image. glGetMap functions Retrieve evaluator parameters. glFrontFace Defines front. 72. 68. glIndexPointer Defines an array of color indexes. glGetColorTableParameterivEXT Retrieves palette parameters from color tables. 69. glGetMaterial functions Retrieve material parameters. . 61. 87. glGetError Retrieves error information. glEvalPoint functions Generate and evaluate a single point in a mesh. 78. 56.and back-facing polygons. 59.46. 63. 70. 50. 60. glIsEnabled Tests whether a capability is enabled. 75. glGetIntegerv Retrieves the value or values of a selected int parameter. 64. 76. 74. 54. glIsList Tests for display list existence. 57. glGenLists Generates a contiguous set of empty display lists. glGenTextures Generates texture names. 67. glFrustum Multiplies the current matrix by a perspective matrix. glInterleavedArrays Simultaneously specifies and enables several interleaved arrays in a larger aggregate array. glGetBooleanv Retrieves the value or values of a selected Boolean parameter. glGetDoublev Retrieves the value or values of a selected double parameter. glFlush Forces execution of OpenGL functions in finite time. glLightModel functions Set the lighting model parameters. glGetFloatv Retrieves the value or values of a selected float parameter. 79. glGetTexEnv functions Retrieve texture environment parameters. glGetTexLevelParameter functions Retrieve texture parameter values for a specific level of detail. 65. glGetPolygonStipple Retrieves the polygon stipple pattern. 82. glLineWidth Specifies the width of rasterized lines. glGetTexGen functions Retrieve texture coordinate generation parameters. 66. 73. 81. 47. glGetString Retrieves a string describing the current OpenGL connection. glGetTexParameter functions Retrieve texture parameter values. glFeedbackBuffer Controls feedback mode. glGetLight functions Retrieve light source parameter values. glLight functions Set light-source parameters. glInitNames Initializes the name stack. 53. glIsTexture Determines whether a name corresponds to a texture. 77. 71. glGetPointerv Retrieves the address of a vertex data array. 62. glIndex functions Set the current color index. glGetColorTableEXT Retrieves the color table data of the current targeted texture palette. 85. 80. glGetColorTableParameterfvEXT. glHint Specifies implementation-specific hints. 84. glFinish Blocks until all OpenGL execution is complete. 86. 55. glGetPixelMap functions Retrieve the specified pixel map. 58. glFog functions Specify fog parameters. 48. glGetClipPlane Retrieves the coefficients of the specified clipping plane. 51. glLineStipple Specifies the line stipple pattern. glIndexMask Controls the writing of individual bits in the color-index buffers.

glPopAttrib Push and pop the attribute stack. glReadPixels Reads a block of pixels from the framebuffer. glRenderMode Sets the rasterization mode. glPopClientAttrib Save and restore groups of client-state variables on the client-attribute stack. 95. glListBase Sets the display list base for glCallLists. glNormalPointer Defines an array of normals. glPolygonStipple Sets the polygon stippling pattern. 89. glNewList. 118. 116. glPrioritizeTextures Sets the residence priority of textures. 125. 104. 99. 102. 108. 96.88. glStencilFunc Sets the function and reference value for stencil testing. 90. glMultMatrix functions Multiply the current matrix by an arbitrary matrix. 117. glPopMatrix Push and pop the current matrix stack. glMapGrid functions Define a one. 91. 124. respectively. 103. glTexCoordPointer Defines an array of texture coordinates. 92. glNormal functions Set the current normal vector. glTexCoord functions Set the current texture coordinates. glPushAttrib. 130. glPassThrough Places a marker in the feedback buffer. glEndList Create or replace a display list. glMaterial functions Specify material parameters for the lighting model. 107. glPushName. glStencilMask Controls the writing of individual bits in the stencil planes. 128. 127. 100. 94. glPolygonOffset Sets the scale and units OpenGL uses to calculate depth values. glPixelStore functions Set pixel storage modes. 105. glPointSize Specifies the diameter of rasterized points. glRasterPos functions Specify the raster position for pixel operations. glRotate functions Multiply the current matrix by a rotation matrix. 109. glRect functions Draw a rectangle. . 131. glMap1 functions Define a one-dimensional evaluator. 110. 98. glPixelTransfer functions Set pixel transfer modes. glPopName Push and pop the name stack. glStencilOp Sets the stencil test actions. glLoadIdentity Replaces the current matrix with the identity matrix. glLoadName Loads a name onto the name stack. 126. 93. glScale functions Multiply the current matrix by a general scaling matrix. 121. glPixelZoom Specifies the pixel zoom factors. glMap2 functions Define a two-dimensional evaluator. respectively. 113. glScissor Defines the scissor box. 114. 129. glLoadMatrix functions Replace the current matrix with an arbitrary matrix. 111. glPushClientAttrib. 101. glPolygonMode Selects a polygon rasterization mode. 97.or two-dimensional mesh. glLogicOp Specifies a logical pixel operation for color index rendering. glShadeModel Selects flat or smooth shading. glOrtho Multiplies the current matrix by an orthographic matrix. 119. glMatrixMode Specifies which matrix is the current matrix. 106. glReadBuffer Slects a color buffer source for pixels. glSelectBuffer Establishes a buffer for selection mode values. 122. 115. 112. glPixelMap functions Set up pixel transfer maps. 120. glPushMatrix. 123.

glTexSubImage2D Specifies a portion of an existing two-dimensional texture image. glTexEnv functions Set texture environment parameters. glTranslate functions Multiply the current matrix by a translation matrix. glTexImage2D Specifies a two-dimensional texture image. glVertexPointer Defines an array of vertex data. 141. 134. . 142. 139. You cannot define a new texture with this function. glVertex These functions specify a vertex. glTexGen functions Control the generation of texture coordinates. 138. You cannot define a new texture with this function. glTexImage1D Specifies a one-dimensional texture image. glTexParameter functions Set texture parameters. 137. 140. glTexSubImage1D Specifies a portion of an existing one-dimensional texture image. 136.132. 133. glViewport Sets the viewport. 135.