HP c3700 - Workstation Скачать руководство пользователя страница 142

E

glEvalCoord

Chapter 5

142

glIsEnabled with argument GL_MAP2_INDEX
glIsEnabled with argument GL_MAP2_COLOR_4
glIsEnabled with argument GL_MAP2_NORMAL
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_1
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_2
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_3
glIsEnabled with argument GL_MAP2_TEXTURE_COORD_4
glIsEnabled with argument GL_AUTO_NORMAL
glGetMap

See Also

glBegin,
glColor,
glEnable,
glEvalMesh,
glEvalPoint,
glIndex,
glMap1,
glMap2,
glMapGrid,
glNormal,
glTexCoord,
glVertex

Содержание c3700 - Workstation

Страница 1: ...OpenGL 1 1 Reference for HP UX 11 x Manufacturing Part Number B2355 IE001 Edition E0302 Copyright 2002 by Hewlett Packard ...

Страница 2: ... as set forth in paragraph b 3 ii of the Rights in Technical Data and Software clause in DFARS 252 227 7013 This document contains proprietary information that is protected by copyright All rights are reserved No part of this document may be photocopied reproduced or translated to another language without the prior written consent of Hewlett Packard Company UNIX is a registered trademark in the Un...

Страница 3: ...Mipmaps 36 gluBuild2DMipmaps 38 glCallList 42 glCallLists 43 glXChooseVisual 46 glClear 50 glClearAccum 52 glClearColor 53 glClearDepth 54 glClearindex 55 glClearStencil 56 glClipPlane 57 glColor 59 glColorMask 63 glColorMaterial 64 glColorPointer 66 glXCopyContext 68 glCopyPixels 70 glCopyTexImage1D 74 glCopyTexImage2D 77 glCopyTexSubImage1D 80 glCopyTexSubImage2D 82 glCopyTexSubImage3DEXT 85 glX...

Страница 4: ...4 glXDestroyGLXPixmap 105 glDisable 106 gluDisk 112 glDrawArrays 113 glDrawArraysSethp 115 glDrawBuffer 117 glDrawElements 119 glDrawPixels 121 glEdgeFlag 128 glEdgeFlagPointer 129 glEnable 131 glEnableClientState 137 glErrorString 139 glEvalCoord 140 glEvalMesh 143 glEvalPoint 146 glFeedbackBuffer 150 glFinish 153 glFlush 154 glFog 155 glFrontFace 158 glFrustum 159 glGenLists 162 glGenTextures 16...

Страница 5: ...04 glGetPointer 206 glGetPolygonStipple 208 glGetString 209 gluGetString 211 gluGetTessProperty 212 glGetTexEnv 213 glGetTexGen 215 glGetTexImage 217 glGetTexLevelParameter 219 glGetTexParameter 222 glHint 226 glIndex 230 glIndexMask 232 glIndexPointer 233 glInitNames 235 glInterleavedArrays 236 glXIntro 238 glXIsDirect 242 glIsEnabled 243 glIsList 246 glIsTexture 247 glLight 250 glLightModel 254 ...

Страница 6: ...x 289 glNewList 292 glNextVisibilityTesthp 294 gluNewNurbsRenderer 295 gluNewQuadric 296 gluNewTess 297 gluNextContour 298 glNormal 300 glNormalPointer 302 gluNurbsCallback 304 gluNurbsCurve 305 gluNurbsPrperty 307 gluNurbsSurface 310 glOrtho 314 gluOrtho2D 316 gluPartialDisk 318 glPassThrough 320 gluPerspective 321 gluPickMatrix 323 glPixelMap 324 glPixelStore 328 glPixelTransfer 333 glPixelZoom ...

Страница 7: ... gluQuadricOrientation 367 gluQuadricTexture 368 glXQueryExtension 369 glXQueryExtensionsString 370 glXQueryServerString 371 glXQueryVersion 372 glRasterPos 374 glReadBuffer 378 glReadPixels 380 glRect 384 glRenderMode 386 glRotate 388 glScale 392 gluScaleImage 394 glScissor 396 glSelectBuffer 398 glShadeModel 400 gluSphere 402 glStencilFunc 403 glStencilMask 405 glStencilOp 406 glXSwapBuffers 408...

Страница 8: ...nter 425 glTexEnv 427 glTexGen 431 glTexImage1D 434 glTexImage2D 439 glTexImage3DEXT 444 glTexParameter 449 glTexSubImage1D 455 glTexSubImage2D 458 glTexSubImage3DEXT 461 glTranslate 464 gluUnProject 468 glXUseXFont 470 glVertex 474 glVertexPointer 477 glViewport 479 glVisibilityBufferhp 480 glXWaitGL 484 glXWaitX 485 ...

Страница 9: ...Chapter 1 9 1 A ...

Страница 10: ...mulation buffer depends on the implementation You can examine this number by calling glGetIntegerv four times with arguments GL_ACCUM_RED_BITS GL_ACCUM_GREEN_BITS GL_ACCUM_BLUE_BITS and GL_ACCUM_ALPHA_BITS Regardless of the number of bits per component the range of values stored by each component is 1 1 The accumulation buffer pixels are mapped one to one with frame buffer pixels glAccum operates ...

Страница 11: ...L_RETURN Transfers accumulation buffer values to the color buffer or buffers currently selected for writing Each R G B and A component is multiplied by value then multiplied by 2n 1 clamped to the range 0 2n 1 and stored in the corresponding display buffer cell The only fragment operations that are applied to this transfer are pixel ownership scissor dithering and color writemasks To clear the acc...

Страница 12: ...A glAccum Chapter 1 12 glLogicOp glPixelStore glPixelTransfer glReadBuffer glReadPixels glScissor glStencilOp ...

Страница 13: ...esting is enabled By default it is not enabled See glEnable and glDisable of GL_ALPHA_TEST func and ref specify the conditions under which the pixel is drawn The incoming alpha value is compared to ref using the function specified by func If the value passes the comparison the incoming fragment is drawn if it also passes subsequent stencil and depth buffer tests If the value fails the comparison n...

Страница 14: ...ons Notes Alpha testing is performed only in RGBA mode Errors GL_INVALID_ENUM is generated if func is not an accepted value GL_INVALID_OPERATION is generated if glAlphaFunc is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_ALPHA_TEST_FUNC glGet with argument GL_ALPHA_TEST_REF glIsEnabled with argument GL_ALPHA_TEST See Also...

Страница 15: ...xtures are resident glAreTexturesResident returns GL_TRUE and the contents of residences are undisturbed If not all the named textures are resident glAreTexturesResident returns GL_FALSE and detailed status is returned in the n elements of residences If an element of residences is GL_TRUE then the texture named by the corresponding element of textures is resident The residence status of a single b...

Страница 16: ...d the contents of residences is indeterminate GL_INVALID_OPERATION is generated if glAreTexturesResident is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGetTexParameter with parameter name GL_TEXTURE_RESIDENT retrieves the residence status of a currently bound texture See Also glBindTexture glGetTexParameter glPrioritizeTextures glTexImage1D ...

Страница 17: ...ngle vertex it is possible to explicitly specify per primitive attributes such as a single normal per individual triangle Changes made to array data between the execution of glBegin and the corresponding execution of glEnd may affect calls to glArrayElement that are made within the same glBegin glEnd period in non sequential ways That is a call to glArrayElement that precedes a change to array dat...

Страница 18: ...A glArrayElement Chapter 1 18 glNormalPointer glTexCoordPointer glVertexPointer ...

Страница 19: ...Chapter 2 19 2 B ...

Страница 20: ...the interpretations are as follows GL_POINTS Treats each vertex as a single point Vertex n defines point n n points are drawn GL_LINES Treats each pair of vertices as an independent line segment Vertices 2n 1 and 2n define line n n 2 lines are drawn GL_LINE_STRIP Draws a connected group of line segments from the first vertex to the last n 1 lines are drawn GL_LINE_LOOP Draws a connected group of l...

Страница 21: ...GL command is executed between glBegin and glEnd the error flag is set and the command is ignored Regardless of the value chosen for mode there is no limit to the number of vertices that can be defined between glBegin and glEnd Lines triangles quadrilaterals and polygons that are incompletely specified are not drawn Incomplete specification results when either too few vertices are provided to spec...

Страница 22: ...Pointer glNormalPointer glVertexPointer glInterleavedArrays or glPixelStore is not allowed after a call to glBegin and before the corresponding call to glEnd but an error may or may not be generated See Also glArrayElement glCallList glCallLists glColor glEdgeFlag glEvalCoord glEvalPoint glIndex glMaterial glNormal glTexCoord glVertex ...

Страница 23: ...alls to gluNurbsCurve to define the attributes of the curve Exactly one of the calls to gluNurbsCurve must have a curve type of GL_MAP1_VERTEX_3 or GL_MAP1_VERTEX_4 To mark the end of the NURBS curve definition call gluEndCurve GL evaluators are used to render the NURBS curve as a series of line segments Evaluator state is preserved during rendering with glPushAttrib GL_EVAL_BIT and glPopAttrib Se...

Страница 24: ...xtContour to start each new contour Finally call gluEndPolygon to signal the end of the definition See the gluTessVertex and gluNextContour reference pages for more details Once gluEndPolygon is called the polygon is tessellated and the resulting triangles are described through callbacks See gluTessCallback for descriptions of the callback functions Notes This command is obsolete and is provided f...

Страница 25: ...ctly one of these calls to gluNurbsSurface must have a surface type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 To mark the end of the NURBS surface definition call gluEndSurface Trimming of NURBS surfaces is supported with gluBeginTrim gluPwlCurve gluNurbsCurve andgluEndTrim See the gluBeginTrim reference page for details GL evaluators are used to render the NURBS surface as a set of polygons Evaluat...

Страница 26: ...single closed trimming loop can consist of multiple curve segments each described as a piece wise linear curve see gluPwlCurve or as a single NURBS curve see gluNurbsCurve or as a combination of both in any order The only library calls that can appear in a trimming loop definition between the calls to gluBeginTrim and gluEndTrim are gluPwlCurve and gluNurbsCurve The area of the NURBS surface that ...

Страница 27: ...left of all of the curves Nested trimming loops are legal as long as the curve orientations alternate correctly If trimming curves are self intersecting or intersect one another an error results If no trimming information is given for a NURBS surface the entire surface is drawn See Also gluBeginSurface gluNewNurbsRenderer gluNurbsCallback gluNurbsCurve gluPwlCurve ...

Страница 28: ...onal texture immediately after it is first bound is equivalent to the state of the default GL_TEXTURE_1D at GL initialization and similarly for two dimensional textures While a texture is bound GL operations on the target to which it is bound affect the bound texture and queries of the target to which it is bound return state from the bound texture If texture mapping of the dimensionality of the t...

Страница 29: ...nsionality that doesn t match that of target GL_INVALID_OPERATION is generated if glBindTexture is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_TEXTURE_1D_BINDING glGet with argument GL_TEXTURE_2D_BINDING See Also glAreTexturesResident glDeleteTextures glGenTextures glGet glGetTexParameter glIsTexture glPrioritizeTextures...

Страница 30: ...r color or index Frame buffer pixels corresponding to 0s in the bitmap are not modified glBitmap takes seven arguments The first pair specifies the width and height of the bitmap image The second pair specifies the location of the bitmap origin relative to the lower left corner of the bitmap image The third pair of arguments specifies x and y offsets to be added to the current raster position afte...

Страница 31: ...to the current raster color texture coordinates or index Notes To set a valid raster position outside the viewport first set a valid raster position inside the viewport then call glBitmap with NULL as the bitmap parameter and with xmove and ymove set to the offsets of the new raster position This technique is useful when panning an image around the viewport Errors GL_INVALID_VALUE is generated if ...

Страница 32: ...cription of the blending operations Initially the GL_BLEND_COLOR_EXT is set to 0 0 0 0 Notes glBlendColorEXT is part of the EXT_blend_color extension not part of the core GL command set If GL_EXT_blend_color is included in the string returned by glGetString when called with argument GL_EXTENSIONS extension EXT_blend_color is supported by the connection Errors GL_INVALID_OPERATION is generated if g...

Страница 33: ...ues that are already in the frame buffer the destination values Blending is initially disabled Use glEnable and glDisable with argument GL_BLEND to enable and disable blending glBlendFunc defines the operation of blending when it is enabled sfactor specifies which of nine methods is used to scale the source color components dfactor specifies which of eight methods is used to scale the destination ...

Страница 34: ...dify its multiplicand and a blend factor equal to 0 reduces its multiplicand to 0 For example when sfactor is GL_SRC_ALPHA dfactor is GL_ONE_MINUS_SRC_ALPHA and As is equal to kA the equations reduce to simple replacement Rd Rs Gd Gs Bd Bs Ad As Table 2 1 Parameter fR fG fB fA GL_ZERO 0 0 0 0 GL_ONE 1 1 1 1 GL_SRC_COLOR Rs kR Gs kG Bs kB As kA GL_ONE_MINUS_SRC_COLOR 1 1 1 1 Rs kR Gs kG Bs kB As kA...

Страница 35: ...s a material opacity ranging from 1 0 KA representing complete opacity to 0 0 0 representing complete transparency When more than one color buffer is enabled for drawing the GL performs blending separately for each enabled buffer using the contents of that buffer for destination color See glDrawBuffer Blending affects only RGBA rendering It is ignored by color index renderers Errors GL_INVALID_ENU...

Страница 36: ...a Specifies a pointer to the image data in memory Description gluBuild1DMipmaps builds a series of pre filtered 1D texture maps of decreasing resolution Mipmaps can be used so that textures don t appear aliased A return value of 0 indicates success Otherwise a GLU error code is returned see gluErrorString gluBuild1DMipmaps first checks whether the width of data is a power of 2 If not it scales a c...

Страница 37: ...pe See the glDrawPixels reference page for a description of the acceptable values for data Notes While you can t query the maximum level directly you can derive it indirectly by calling glGetTexLevelParameter First query for the width actually used at level 0 The width may be unequal to width since gluBuild1DMipmaps might have shrunk or expanded width if width isn t a power of 2 or if the implemen...

Страница 38: ...ta type for data Must be one of GL_UNSIGNED_BYTE GL_BYTE GL_BITMAP GL_UNSIGNED_SHORT GL_SHORT GL_UNSIGNED_INT GL_INT or GL_FLOAT data Specifies a pointer to the image data in memory Description gluBuild2DMipmaps builds a series of pre filtered 2D texture maps of decreasing resolution Mipmaps can be used so that textures don t appear aliased A return value of 0 indicates success Otherwise a GLU err...

Страница 39: ...ght are both powers of 2 which fit in the implementation level 0 is a copy of data and the highest level is log2 max width height For example if width is 64 and height is 16 the following mipmaps are built 64 16 32 8 16 4 8 2 4 1 2 1 and 1 1 These correspond to levels 0 through 6 respectively See the glTexImage1D reference page for a description of the acceptable values for format See the glDrawPi...

Страница 40: ...B gluBuild2DMipmaps Chapter 2 40 ...

Страница 41: ...Chapter 3 41 3 C ...

Страница 42: ...e another a limit is placed on the nesting level of display lists during display list execution This limit is at least 64 and it depends on the implementation GL state is not saved and restored across a call to glCallList Thus changes made to GL state during the execution of a display list remain after execution of the display list is completed Use glPushAttrib glPopAttrib glPushMatrix and glPopMa...

Страница 43: ...in each display list are executed in order just as if they were called without using a display list Names of display lists that have not been defined are ignored glCallLists provides an efficient means for executing more than one display list type allows lists with various name formats to be accepted The formats are as follows GL_BYTE lists is treated as an array of signed bytes each in the range ...

Страница 44: ...e specified in lists before that display list is executed glCallLists can appear inside a display list To avoid the possibility of infinite recursion resulting from display list scaling one another a limit is placed on the nesting level of display lists during display list execution This limit must be at least 64 and it depends on the implementation GL state is not saved and restored across a call...

Страница 45: ...C glCallLists Chapter 3 45 See Also glCallList glDeleteLists glGenLists glListBase glNewList glPushAttrib glPushMatrix ...

Страница 46: ...ion use XFree All boolean GLX attributes default to False except GLX_USE_GL which defaults to True All integer GLX attributes default to zero Default specifications are superseded by attributes included in attribList Boolean attributes included in attribList are understood to be True Integer attributes and enumerated type attributes are followed immediately by the corresponding desired or minimum ...

Страница 47: ... of at least the minimum size is preferred GLX_BLUE_SIZE Must be followed by a nonnegative minimum size specification If this value is zero the smallest available blue buffer is preferred Otherwise the largest available blue buffer of at least the minimum size is preferred GLX_ALPHA_SIZE Must be followed by a nonnegative minimum size specification If this value is zero the smallest available alpha...

Страница 48: ...er not an overlay or underlay buffer The returned visual supports at least four bits each of red green and blue and possibly no bits of alpha It does not support color index mode double buffering or stereo display It may or may not have one or more auxiliary color buffers a depth buffer a stencil buffer or an accumulation buffer Notes XVisualInfo is defined in Xutil h It is a structure that includ...

Страница 49: ...C glXChooseVisual Chapter 3 49 See Also glXCreateContext glXGetConfig ...

Страница 50: ...the scissor test dithering and the buffer writemasks affect the operation of glClear The scissor box bounds the cleared region Alpha function blend function logical operation stenciling texture mapping and depth buffering are ignored by glClear glClear takes a single argument that is the bitwise or of several values indicating which buffer is to be cleared The values are as follows GL_COLOR_BUFFER...

Страница 51: ...he execution of glBegin and the corresponding execution of glEnd Associated gets glGet with argument GL_ACCUM_CLEAR_VALUE glGet with argument GL_DEPTH_CLEAR_VALUE glGet with argument GL_INDEX_CLEAR_VALUE glGet with argument GL_COLOR_CLEAR_VALUE glGet with argument GL_STENCIL_CLEAR_VALUE See Also glClearAccum glClearColor glClearDepth glClearIndex glClearStencil glDrawBuffer glScissor ...

Страница 52: ...ed when the accumulation buffer is cleared The initial values are all 0 Description glClearAccum specifies the red green blue and alpha values used by glClear to clear the accumulation buffer Values specified by glClearAccum are clamped to the range 1 1 Errors GL_INVALID_OPERATION is generated if glClearAccum is executed between the execution of glBegin and the corresponding execution of glEnd Ass...

Страница 53: ...s used when the color buffers are cleared The initial values are all 0 Description glClearColor specifies the red green blue and alpha values used by glClear to clear the color buffers Values specified by glClearColor are clamped to the range 0 1 Errors GL_INVALID_OPERATION is generated if glClearColor is executed between the execution of glBegin and the corresponding execution of glEnd Associated...

Страница 54: ...buffer is cleared The initial value is 1 Description glClearDepth specifies the depth value used by glClear to clear the depth buffer Values specified by glClearDepth are clamped to the range 0 1 Errors GL_INVALID_OPERATION is generated if glClearDepth is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_DEPTH_CLEAR_VALUE See ...

Страница 55: ...he color index buffers c is not clamped Rather c is converted to a fixed point value with unspecified precision to the right of the binary point The integer part of this value is then masked with 2m 1 where m is the number of bits in a color index stored in the frame buffer Errors GL_INVALID_OPERATION is generated if glClearIndex is executed between the execution of glBegin and the corresponding e...

Страница 56: ...al value is 0 Description glClearStencil specifies the index used by glClear to clear the stencil buffer s is masked with 2m 1 where m is the number of bits in the stencil buffer Errors GL_INVALID_OPERATION is generated if glClearStencil is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_STENCIL_CLEAR_VALUE glGet with argume...

Страница 57: ...ipping planes Because the resulting clipping region is the intersection of the defined half spaces it is always convex glClipPlane specifies a half space using a four component plane equation When glClipPlane is called equation is transformed by the inverse of the modelview matrix and stored in the resulting eye coordinates Subsequent changes to the modelview matrix have no effect on the stored pl...

Страница 58: ...C glClipPlane Chapter 3 58 Associated gets glGetClipPlane glIsEnabled with argument GL_CLIP_PLANE f2i fP See Also glEnable ...

Страница 59: ...lColor4usv set the current color C Specification void glColor3b GLbyte red GLbyte green GLbyte blue void glColor3d GLdouble red GLdouble green GLdouble blue void glColor3f GLfloat red GLfloat green GLfloat blue void glColor3i GLint red GLint green GLint blue void glColor3s GLshort red GLshort green GLshort blue void glColor3ub GLubyte red GLubyte green GLubyte blue void glColor3ui GLuint red GLuin...

Страница 60: ...byte green GLubyte blue GLubyte alpha void glColor4ui GLuint red GLuint green GLuint blue GLuint alpha void glColor4us GLushort red GLushort green GLushort blue GLushort alpha void glColor3bv const GLbyte v void glColor3dv const GLdouble v void glColor3fv const GLfloat v void glColor3iv const GLint v void glColor3sv const GLshort v void glColor3ubv const GLubyte v void glColor3uiv const GLuint v v...

Страница 61: ...ur signed byte short or long integers as arguments When v is appended to the name the color commands can take a pointer to an array of such values Current color values are stored in floating point format with unspecified mantissa and exponent sizes Unsigned integer color components when specified are linearly mapped to floating point values such that the largest representable value maps to 1 0 ful...

Страница 62: ...C glColor Chapter 3 62 Associated Gets glGet with argument GL_CURRENT_COLOR glGet with argument GL_RGBA_MODE See Also glIndex ...

Страница 63: ...or components in the frame buffer can or cannot be written If red is GL_FALSE for example no change is made to the red component of any pixel in any of the color buffers regardless of the drawing operation attempted Changes to individual bits of components cannot be controlled Rather changes are either enabled or disabled for entire color components Errors GL_INVALID_OPERATION is generated if glCo...

Страница 64: ...color at all times To enable and disable GL_COLOR_MATERIAL call glEnable and glDisable with argument GL_COLOR_MATERIAL GL_COLOR_MATERIAL is initially disabled Notes glColorMaterial makes it possible to change a subset of material parameters for each vertex using only the glColor command without calling glMaterial If only such a subset of parameters is to be specified for each vertex calling glColo...

Страница 65: ... the execution of glBegin and the corresponding execution of glEnd Associated Gets glIsEnabled with argument GL_COLOR_MATERIAL glGet with argument GL_COLOR_MATERIAL_PARAMETER glGet with argument GL_COLOR_MATERIAL_FACE See Also glColor glColorPointer glDrawElements glEnable glLight glLightModel glMaterial ...

Страница 66: ...on and data format of an array of color components to use when rendering size specifies the number of components per color and must be 3 or 4 type specifies the data type of each color component and stride specifies the byte stride from one color to the next allowing vertexes and attributes to be packed into a single array or stored in separate arrays Single array storage may be more efficient on ...

Страница 67: ... glPopClientAttrib instead Errors GL_INVALID_VALUE is generated if size is not 3 or 4 GL_INVALID_ENUM is generated if type is not an accepted value GL_INVALID_VALUE is generated if stride is negative Associated Gets glIsEnabled with argument GL_COLOR_ARRAY glGet with argument GL_COLOR_ARRAY_SIZE glGet with argument GL_COLOR_ARRAY_TYPE glGet with argument GL_COLOR_ARRAY_STRIDE glGetPointerv with ar...

Страница 68: ... an address space Two rendering contexts share an address space if both are non direct using the same server or if both are direct and owned by a single process Note that in the non direct case it is not necessary for the calling threads to share an address space only for their related rendering contexts to share an address space Not all values for GL state can be copied For example pixel pack and...

Страница 69: ...en BadAccess is generated if dst is current to any thread including the calling thread at the time glXCopyContext is called GLXBadCurrentWindow is generated if src is the current context and the current drawable is a window that is no longer valid GLXBadContext is generated if either src or dst is not a valid GLX context See Also glPushAttrib glXCreateContext glXIsDirect ...

Страница 70: ...y the window coordinates of the lower left corner of the rectangular region to be copied width and height specify the dimensions of the rectangular region to be copied Both width and height must not be negative Several parameters control the processing of the pixel data while it is being copied These parameters are set with three commands glPixelTransfer glPixelMap and glPixelZoom This reference p...

Страница 71: ... are applied before the fragments are written to the frame buffer GL_DEPTH Depth values are read from the depth buffer and converted directly to an internal floating point format with unspecified precision The resulting floating point depth value is then multiplied by GL_DEPTH_SCALE and added to GL_DEPTH_BIAS The result is clamped to the range 0 1 The GL then converts the resulting depth component...

Страница 72: ... window to the current raster position use glCopyPixels 0 0 1 1 GL_COLOR Notes Modes specified by glPixelStore have no effect on the operation of glCopyPixels Errors GL_INVALID_ENUM is generated if type is not an accepted value GL_INVALID_VALUE is generated if either width or height is negative GL_INVALID_OPERATION is generated if type is GL_DEPTH and there is no depth buffer GL_INVALID_OPERATION ...

Страница 73: ...C glCopyPixels Chapter 3 73 glReadBuffer glReadPixels glStencilFunc ...

Страница 74: ...4 GL_LUMINANCE6_ALPHA2 GL_LUMINANCE8_ALPHA8 GL_LUMINANCE12_ALPHA4 GL_LUMINANCE12_ALPHA12 GL_LUMINANCE16_ALPHA16 GL_INTENSITY GL_INTENSITY4 GL_INTENSITY8 GL_INTENSITY12 GL_INTENSITY16 GL_RGB GL_R3_G3_B2 GL_RGB4 GL_RGB5 GL_RGB8 GL_RGB10 GL_RGB12 GL_RGB16 GL_RGBA GL_RGBA2 GL_RGBA4 GL_RGB5_A1 GL_RGBA8 GL_RGB10_A2 GL_RGBA12 or GL_RGBA16 Additionally internalFormat maybe one of the symbolic constants GL...

Страница 75: ...he GL version is 1 1 or greater Texturing has no effect in color index mode 1 2 3 and 4 are not accepted values for internalFormat The GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_EXT GL_DEPTH_COMPONENT24_EXT and GL_DEPTH_COMPONENT32_EXT values of internalFormat may be used An image with 0 width indicates a NULL texture Errors GL_INVALID_ENUM is generated if target is not one of the allowable values GL...

Страница 76: ...ge1D Chapter 3 76 See Also glCopyPixels glCopyTexImage2D glCopyTexSubImage1D glCopyTexSubImage2D glPixelStore glPixelTransfer glTexEnv glTexGen glTexImage1D glTexImage2D glTexSubImage1D glTexSubImage2D glTexParameter ...

Страница 77: ...MINANCE_ALPHA GL_LUMINANCE4_ALPHA4 GL_LUMINANCE6_ALPHA2 GL_LUMINANCE8_ALPHA8 GL_LUMINANCE12_ALPHA4 GL_LUMINANCE12_ALPHA12 GL_LUMINANCE16_ALPHA16 GL_INTENSITY GL_INTENSITY4 GL_INTENSITY8 GL_INTENSITY12 GL_INTENSITY16 GL_RGB GL_R3_G3_B2 GL_RGB4 GL_RGB5 GL_RGB8 GL_RGB10 GL_RGB12 GL_RGB16 GL_RGBA GL_RGBA2 GL_RGBA4 GL_RGB5_A1 GL_RGBA8 GL_RGB10_A2 GL_RGBA12 or GL_RGBA16 Additionally internalFormat may b...

Страница 78: ...dering context then the values obtained for those pixels are undefined Notes glCopyTexImage2D is available only if the GL version is 1 1 or greater Texturing has no effect in color index mode 1 2 3 and 4 are not accepted values for internalFormat The GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_EXT GL_DEPTH_COMPONENT24_EXT and GL_DEPTH_COMPONENT32_EXT values of internalFormat may be used An image with ...

Страница 79: ...lGetTexImage glIsEnabled with argument GL_TEXTURE_2D See Also glCopyPixels glCopyTexImage1D glCopyTexSubImage1D glCopyTexSubImage2D glPixelStore glPixelTransfer glTexEnv glTexGen glTexImage1D glTexImage2D glTexSubImage1D glTexSubImage2D glTexParameter ...

Страница 80: ...y and with length width replaces the portion of the texture array with X indices xoffset through xoffset width 1 inclusive The destination in the texture array may not include any texels outside the texture array as it was originally specified The pixels in the row are processed exactly as if glCopyPixels had been called but the process stops just before final conversion At this point all pixel co...

Страница 81: ... be generated if level log2 max where max is the returned value of GL_MAX_TEXTURE_SIZE GL_INVALID_VALUE is generated if y b or if width b where b is the border width of the texture array GL_INVALID_VALUE is generated if xoffset b or xoffset width w b where w is the GL_TEXTURE_WIDTH and b is the GL_TEXTURE_BORDER of the texture image being modified Note that w includes twice the border width Associ...

Страница 82: ... glCopyTexSubImage2D replaces a rectangular portion of a two dimensional texture image with pixels from the current GL_READ_BUFFER rather than from main memory as is the case for glTexSubImage2D The screen aligned pixel rectangle with lower left corner at x y and with width width and height height replaces the portion of the texture array with X indices xoffset through xoffset width 1 inclusive an...

Страница 83: ... defined by a previous glTexImage2D or glCopyTexImage2D operation GL_INVALID_VALUE is generated if level is less than 0 GL_INVALID_VALUE may be generated if level is greater than log2 max where max is the returned value of GL_MAX_TEXTURE_SIZE GL_INVALID_VALUE is generated if x b or if y b where b is the border width of the texture array GL_INVALID_VALUE is generated if xoffset b xoffset width w b ...

Страница 84: ...C glCopyTexSubImage2D Chapter 3 84 glTexParameter glTexSubImage1D glTexSubImage2D ...

Страница 85: ...he texture array y The Y coordinate of the lower left corner of the pixel rectangle to be transferred to the texture array width The width of the texture sub image height The height of the texture sub image Description glCopyTexSubImage3DEXT replaces a rectangular portion of a three dimensional texture image with pixels from the current GL_READ_BUFFER rather than from main memory as is the case fo...

Страница 86: ... level is less than zero or greater than log2max where max is the returned value of GL_MAX_TEXTURE_SIZE GL_INVALID_VALUE is generated if xoffset TEXTURE_BORDER xoffset width TEXTURE_WIDTH TEXTURE_BORDER yoffset TEXTURE_BORDER or if zoffset TEXTURE_BORDER where TEXTURE_WIDTH TEXTURE_HEIGHT and TEXTURE_BORDER are the state values of the texture image being modified and interlace is 1 if GL_INTERLACE...

Страница 87: ...dering if the connection is to an X server that is local and if a direct rendering context is available An implementation may return an indirect context when direct is True If direct is False then a rendering context that renders through the X server is always created Direct rendering provides a performance advantage in some implementations However direct rendering contexts cannot be shared outsid...

Страница 88: ... group is equivalent to a process It may not be possible to render to a GLX pixmap with a direct rendering context Errors NULL is returned if execution fails on the client side BadMatch is generated if the context to be created would not share the address space or the screen of the context specified by shareList BadValue is generated if vis is not a valid visual for example if a particular GLX imp...

Страница 89: ...e rendering area with a GLX rendering context The X pixmap identified by pixmap is used as the front left buffer of the resulting off screen rendering area All other buffers specified by vis including color buffers other than the front left buffer are created without externally visible names GLX pixmaps with double buffering are supported However glXSwapBuffers is ignored by these pixmaps Some imp...

Страница 90: ...C glXCreateGLXPixmap Chapter 3 90 BadAlloc is generated if the server cannot allocate the GLX pixmap See Also glXCreateContext glXIsDirect glXMakeCurrent ...

Страница 91: ...nd disable facet culling call the glEnable and glDisable commands with the argument GL_CULL_FACE Facets include triangles quadrilaterals polygons and rectangles glFrontFace specifies which of the clockwise and counterclockwise facets are front facing and back facing See glFrontFace Notes If mode is GL_FRONT_AND_BACK no facets are drawn but other primitives such as points and lines are drawn Errors...

Страница 92: ... oriented along the Z axis The base of the cylinder is placed at Z 0 and the top at Z height Like a sphere a cylinder is subdivided around the Z axis into slices and along the Z axis into stacks Note that if top is set to 0 0 this routine generates a cone If the orientation is set to GLU_OUTSIDE with gluQuadricOrientation then any generated normals point away from the Z axis Otherwise they point t...

Страница 93: ...Chapter 4 93 4 D ...

Страница 94: ...ist to be deleted and range is the number of display lists to delete All display lists d with list d list range 1 are deleted All storage locations allocated to the specified display lists are freed and the names are available for reuse at a later time Names within the range that do not have an associated display list are ignored If range is 0 nothing happens Errors GL_INVALID_VALUE is generated i...

Страница 95: ... gluDeleteNurbsRenderer GLUnurbs nurb Parameters nurb Specifies the NURBS object to be destroyed Description gluDeleteNurbsRenderer destroys the NURBS object which was created with gluNewNurbsRenderer and frees any memory it uses Once gluDeleteNurbsRenderer has been called nurb cannot be used again See Also gluNewNurbsRenderer ...

Страница 96: ...tion void gluDeleteQuadric GLUquadric quad Parameters quad Specifies the quadrics object to be destroyed Description gluDeleteQuadric destroys the quadrics object created with gluNewQuadric and frees any memory it uses Once gluDeleteQuadric has been called quad cannot be used again See Also gluNewQuadric ...

Страница 97: ...fication void gluDeleteTess GLUtesselator tess Parameters tess Specifies the tessellation object to destroy Description gluDeleteTess destroys the indicated tessellation object which was created with gluNewTess and frees any memory that it used See Also gluBeginPolygon gluNewTess gluTessCallback ...

Страница 98: ...reuse for example by glGenTextures If a texture that is currently bound is deleted the binding everts to 0 the default texture glDeleteTextures silently ignores 0s and names that do not correspond to existing textures Notes glDeleteTextures is available only if the GL version is 1 1 or greater Errors GL_INVALID_VALUE is generated if n is negative GL_INVALID_OPERATION is generated if glDeleteTextur...

Страница 99: ...D glDeleteTextures Chapter 4 99 glTexImage1D glTexImage2D glTexParameter ...

Страница 100: ...d glDisable of GL_DEPTH_TEST func specifies the conditions under which the pixel will be drawn The comparison functions are as follows GL_NEVER Never passes GL_LESS Passes if the incoming depth value is less than the stored depth value GL_EQUAL Passes if the incoming depth value is equal to the stored depth value GL_LEQUAL Passes if the incoming depth value is less than or equal to the stored dept...

Страница 101: ... disabled Errors GL_INVALID_ENUM is generated if func is not an accepted value GL_INVALID_OPERATION is generated if glDepthFunc is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_DEPTH_FUNC glIsEnabled with argument GL_DEPTH_TEST See Also glDepthRange glEnable glPolygonOffset ...

Страница 102: ...ally depth buffer writing is enabled Description glDepthMask specifies whether the depth buffer is enabled for writing If flag is GL_FALSE depth buffer writing is disabled Otherwise it is enabled Initially depth buffer writing is enabled Errors GL_INVALID_OPERATION is generated if glDepthMask is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGe...

Страница 103: ...lized depth coordinates in this range to window depth coordinates Regardless of the actual depth buffer implementation window coordinate depth values are treated as though they range from 0 through 1 like color components Thus the values accepted by glDepthRange are both clamped to this range before they are accepted The setting of 0 1 maps the near plane to 0 and the far plane to 1 With this mapp...

Страница 104: ...er ctx Specifies the GLX context to be destroyed Description If the GLX rendering context ctx is not current to any thread glXDestroyContext destroys it immediately Otherwise ctx is destroyed when it becomes not current to any thread In either case the resource ID referenced by ctx is freed immediately Errors GLXBadContext is generated if ctx is not a valid GLX context See Also glXCreateContext gl...

Страница 105: ...ion to the X server pix Specifies the GLX pixmap to be destroyed Description If the GLX pixmap pix is not current to any client glXDestroyGLXPixmap destroys it immediately Otherwise pix is destroyed when it becomes not current to any client In either case the resource ID is freed immediately Errors GLXBadPixmap is generated if pix is not a valid GLX pixmap See Also glXCreateGLXPixmap glXMakeCurren...

Страница 106: ...ne of the following values GL_ALPHA_TEST If enabled do alpha testing See glAlphaFunc GL_AUTO_NORMAL If enabled generate normal vectors when either GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 is used to generate vertices See glMap2 GL_BLEND If enabled blend the incoming RGBA color values with the values in the color buffers See glBlendFunc GL_CLIP_PLANEi If enabled clip geometry against user defined clipp...

Страница 107: ...rrent color or index with each vertex See glMaterial glLightModel and glLight GL_LINE_SMOOTH If enabled draw lines with correct filtering Otherwise draw aliased lines See glLineWidth GL_LINE_STIPPLE If enabled use the current line stipple pattern when drawing lines See glLineStipple GL_MAP1_COLOR_4 If enabled calls to glEvalCoord1 glEvalMesh1 and glEvalPoint1 generate RGBA values See glMap1 GL_MAP...

Страница 108: ...e normals See glMap2 GL_MAP2_TEXTURE_COORD_1 If enabled calls to glEvalCoord2 glEvalMesh2 and glEvalPoint2 generate s GL_MAP2_TEXTURE_COORD_2 If enabled calls to glEvalCoord2 glEvalMesh2 and glEvalPoint2 generate s and t texture coordinates See glMap2 GL_MAP2_TEXTURE_COORD_3 If enabled calls to glEvalCoord2 glEvalMesh2 and glEvalPoint2 generate s t and r texture coordinates See glMap2 GL_MAP2_TEXT...

Страница 109: ...endered in GL_LINE mode an offset is added to depth values of a polygon s fragments before the depth comparison is performed See glPolygonOffset GL_POLYGON_OFFSET_POINT If enabled an offset is added to depth values of a polygon s fragments before the depth comparison is performed if the polygon is rendered in GL_POINT mode See glPolygonOffset GL_POLYGON_SMOOTH If enabled draw polygons with proper ...

Страница 110: ...d See glTexGen GL_TEXTURE_GEN_S If enabled the s texture coordinate is computed using the texture generation function defined with glTexGen Otherwise the current s texture coordinate is used See glTexGen GL_TEXTURE_GEN_T If enabled the t texture coordinate is computed using the texture generation function defined with glTexGen Otherwise the current t texture coordinate is used See glTexGen Notes G...

Страница 111: ...e glFog glGet glIsEnabled glLight glLightModel glLineWidth glLineStipple glLogicOp glMap1 glMap2 glMaterial glNormal glPointSize glPolygonMode glPolygonOffset glPolygonStipple glScissor glStencilFunc glStencilOp glTexGen glTexImage1D glTexImage2D ...

Страница 112: ...ircular hole with a radius of inner If inner is 0 then no hole is generated The disk is subdivided around the Z axis into slices like pizza slices and also about the Z axis into rings as specified by slices and loops respectively With respect to orientation the z side of the disk is considered to be outside see gluQuadricOrientation This means that if the orientation is set to GLU_OUTSIDE then any...

Страница 113: ...awArrays When glDrawArrays is called it uses count sequential elements from each enabled array to construct a sequence of geometric primitives beginning with element first mode specifies what kind of primitives are constructed and how the array elements construct those primitives If GL_VERTEX_ARRAY is not enabled no geometric primitives are generated Vertex attributes that are modified by glDrawAr...

Страница 114: ...nerated if count is negative GL_INVALID_OPERATION is generated if glDrawArrays is executed between the execution of glBegin and the corresponding glEnd See Also glArrayElement glColorPointer glDrawElements glEdgeFlagPointer glGetPointer glIndexPointer glInterleavedArrays glNormalPointer glTexCoordPointer glVertexPointer ...

Страница 115: ...construct a sequence of primitives with a single call to glDrawArraySethp When glDrawArraySethp is called it iterates over count 1 array indices from the list For 0 i count glDrawArraySethp uses list i 1 list i sequential elements from each enabled array to construct a sequence of geometric primitives beginning with element list i mode specifies what kind of primitives are constructed and how the ...

Страница 116: ...es affect display lists when the lists are created not when the lists are executed Errors GL_INVALID_ENUM is generated if mode is not an accepted value GL_INVALID_VALUE is generated if count is negative GL_INVALID_OPERATION is generated if glDrawArraySethp is executed between the execution of glBegin and the corresponding glEnd See Also glArrayElement glColorPointer glDrawArrays glDrawElements glE...

Страница 117: ...d GL_BACK for double buffered contexts Description When colors are written to the frame buffer they are written into the color buffers specified by glDrawBuffer The specifications are as follows GL_NONE No color buffers are written GL_FRONT_LEFT Only the front left color buffer is written GL_FRONT_RIGHT Only the front right color buffer is written GL_BACK_LEFT Only the back left color buffer is wr...

Страница 118: ...f more than one color buffer is selected for drawing then blending or logical operations are computed and applied independently for each color buffer and can produce different results in each buffer Monoscopic contexts include only left buffers and stereoscopic contexts include both left and right buffers Likewise single buffered contexts include only front buffers and double buffered contexts inc...

Страница 119: ... GL function to pass each individual vertex normal texture coordinate edge flag or color you can pre specify separate arrays of vertexes normals and so on and use them to construct a sequence of primitives with a single call to glDrawElements When glDrawElements is called it uses count sequential elements from an enabled array starting at indices to construct a sequence of geometric primitives mod...

Страница 120: ... values affect display lists when the lists are created not when the lists are executed Errors GL_INVALID_ENUM is generated if mode is not an accepted value GL_INVALID_VALUE is generated if count is negative GL_INVALID_OPERATION is generated ifglDrawElements is executed between the execution of glBegin and the corresponding glEnd See Also glArrayElement glColorPointer glDrawArrays glEdgeFlagPointe...

Страница 121: ...ON to query the raster position Several parameters define the encoding of pixel data in memory and control the processing of the pixel data before it is placed in the frame buffer These parameters are set with four commands glPixelStore glPixelTransfer glPixelMap and glPixelZoom This reference page describes the effects on glDrawPixels of many but not all of the parameters specified by these four ...

Страница 122: ... case zero bits fill otherwise unspecified bit locations in the result If the GL is in RGBA mode the resulting index is converted to an RGBA pixel with the help of the GL_PIXEL_MAP_I_TO_R GL_PIXEL_MAP_I_TO_G GL_PIXEL_MAP_I_TO_B and GL_PIXEL_MAP_I_TO_A tables If the GL is in color index mode and if GL_MAP_COLOR is true the index is replaced with the value that it references in lookup table GL_PIXEL...

Страница 123: ...dow coordinates to the nth fragment such that xn xr n mod width yn yr n width where xr yr is the current raster position These pixel fragments are then treated just like the fragments generated by rasterizing points lines or polygons Texture mapping fog and all the fragment operations are applied before the fragments are written to the frame buffer GL_RGBA Each pixel is a four component group for ...

Страница 124: ...l GL_ALPHA Each pixel is a single alpha component This component is converted to the internal floating point format in the same way the alpha component of an RGBA pixel is It is then converted to an RGBA pixel with red green and blue set to 0 After this conversion the pixel is treated as if it had been read as an RGBA pixel GL_RGB Each pixel is a three component group red first followed by green f...

Страница 125: ...epted values GL_INVALID_OPERATION is generated if format is GL_RED GL_GREEN GL_BLUE GL_ALPHA GL_RGB GL_RGBA GL_LUMINANCE or GL_LUMINANCE_ALPHA and the GL is in color index mode GL_INVALID_ENUM is generated if type is GL_BITMAP and format is not either GL_COLOR_INDEX or GL_STENCIL_INDEX GL_INVALID_OPERATION is generated if format is GL_STENCIL_INDEX and there is no stencil buffer GL_INVALID_OPERATI...

Страница 126: ...D glDrawPixels Chapter 4 126 See Also glAlphaFunc glBlendFunc glCopyPixels glDepthFunc glLogicOp glPixelMap glPixelStore glPixelTransfer glPixelZoom glRasterPos glReadPixels glScissor glStencilFunc ...

Страница 127: ...Chapter 5 127 5 E ...

Страница 128: ...edge If the current edge flag is true when the vertex is specified the vertex is marked as the start of a boundary edge Otherwise the vertex is marked as the start of a non boundary edge glEdgeFlag sets the edge flag bit to GL_TRUE if flag is GL_TRUE and to GL_FALSE otherwise The vertices of connected triangles and connected quadrilaterals are always marked as boundary regardless of the value of t...

Страница 129: ...State and glDisableClientState with the argument GL_EDGE_FLAG_ARRAY If enabled the edge flag array is used when glDrawArrays glDrawElements or glArrayElement is called Use glDrawArrays to construct a sequence of primitives all of the same type from pre specified vertex and vertex attribute arrays Use glArrayElement to specify primitives by indexing vertexes and vertex attributes and glDrawElements...

Страница 130: ...ith argument GL_EDGE_FLAG_ARRAY glGet with argument GL_EDGE_FLAG_ARRAY_STRIDE glGetPointer with argument GL_EDGE_FLAG_ARRAY_POINTER See Also glArrayElement glColorPointer glDrawArrays glDrawElements glEnable glGetPointer glIndexPointer glNormalPointer glPopClientAttrib glPushClientAttrib glTexCoordPointer glVertexPointer ...

Страница 131: ...e of the following values GL_ALPHA_TEST If enabled do alpha testing See glAlphaFunc GL_AUTO_NORMAL If enabled generate normal vectors when either GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 is used to generate vertices See glMap2 GL_BLEND If enabled blend the incoming RGBA color values with the values in the color buffers See glBlendFunc GL_CLIP_PLANEi If enabled clip geometry against user defined clippi...

Страница 132: ...rrent color or index with each vertex See glMaterial glLightModel and glLight GL_LINE_SMOOTH If enabled draw lines with correct filtering Otherwise draw aliased lines See glLineWidth GL_LINE_STIPPLE If enabled use the current line stipple pattern when drawing lines See glLineStipple GL_MAP1_COLOR_4 If enabled calls to glEvalCoord1 glEvalMesh1 and glEvalPoint1 generate RGBA values See glMap1 GL_MAP...

Страница 133: ...e normals See glMap2 GL_MAP2_TEXTURE_COORD_1 If enabled calls to glEvalCoord2 glEvalMesh2 and glEvalPoint2 generate s GL_MAP2_TEXTURE_COORD_2 If enabled calls to glEvalCoord2 glEvalMesh2 and glEvalPoint2 generate s and t texture coordinates See glMap2 GL_MAP2_TEXTURE_COORD_3 If enabled calls to glEvalCoord2 glEvalMesh2 and glEvalPoint2 generate s t and r texture coordinates See glMap2 GL_MAP2_TEXT...

Страница 134: ...ndered in GL_LINE mode an offset is added to depth values of a polygon s fragments before the depth comparison is performed See glPolygonOffset GL_POLYGON_OFFSET_POINT If enabled an offset is added to depth values of a polygon s fragments before the depth comparison is performed if the polygon is rendered in GL_POINT mode See glPolygonOffset GL_POLYGON_SMOOTH If enabled draw polygons with proper f...

Страница 135: ...xGen GL_TEXTURE_GEN_S If enabled the s texture coordinate is computed using the texture generation function defined with glTexGen Otherwise the current s texture coordinate is used See glTexGen GL_TEXTURE_GEN_T If enabled the t texture coordinate is computed using the texture generation function defined with glTexGen Otherwise the current t texture coordinate is used See glTexGen Notes GL_POLYGON_...

Страница 136: ...et glIsEnabled glLight glLightModel glLineWidth glLineStipple glLogicOp glMap1 glMap2 glMaterial glNormal glPointSize glPolygonMode glPolygonOffset glPolygonStipple glScissor glStencilFunc glStencilOp glTexGen glTexImage1D glTexImage2D ...

Страница 137: ...rgument cap which can assume one of the following values GL_COLOR_ARRAY If enabled the color array is enabled for writing and used during rendering when glDrawArrays or glDrawElements is called See glColorPointer GL_EDGE_FLAG_ARRAY If enabled the edge flag array is enabled for writing and used during rendering when glDrawArrays or glDrawElements is called See glEdgeFlagPointer GL_INDEX_ARRAY If en...

Страница 138: ...reater Errors GL_INVALID_ENUM is generated if cap is not an accepted value glEnableClientState is not allowed between the execution of glBegin and the corresponding glEnd but an error may or may not be generated If no error is generated the behavior is undefined See Also glArrayElement glColorPointer glDrawArrays glDrawElements glEdgeFlagPointer glEnable glGetPointer glIndexPointer glInterleavedAr...

Страница 139: ...rror string from a GL or GLU error code The string is in ISO Latin 1 format For example gluErrorString GL_OUT_OF_MEMORY returns the string out of memory The standard GLU error codes are GLU_INVALID_ENUM GLU_INVALID_VALUE and GLU_OUT_OF_MEMORY Certain other GLU functions can return specialized error codes through callbacks See the glGetError reference page for the list of GL error codes See Also gl...

Страница 140: ...and This argument is not present in a glEvalCoord1 command u Specifies a pointer to an array containing either one or two domain coordinates The first coordinate is u The second coordinate is v which is present only in glEvalCoord2 versions Description glEvalCoord1 evaluates enabled one dimensional maps at argument u glEvalCoord2 does the same for two dimensional maps using two domain values u and...

Страница 141: ...inates in this case GL_MAP2_TEXTURE_COORD_2 is carried out GL_MAP1_VERTEX_4 overrides GL_MAP1_VERTEX_3 and GL_MAP2_VERTEX_4 overrides GL_MAP2_VERTEX_3 in the same manner If neither a three nor a four component vertex map is enabled for the specified dimension the glEvalCoord command is ignored If you have enabled automatic normal generation by calling glEnable with argument GL_AUTO_NORMAL glEvalCo...

Страница 142: ...bled with argument GL_MAP2_TEXTURE_COORD_1 glIsEnabled with argument GL_MAP2_TEXTURE_COORD_2 glIsEnabled with argument GL_MAP2_TEXTURE_COORD_3 glIsEnabled with argument GL_MAP2_TEXTURE_COORD_4 glIsEnabled with argument GL_AUTO_NORMAL glGetMap See Also glBegin glColor glEnable glEvalMesh glEvalPoint glIndex glMap1 glMap2 glMapGrid glNormal glTexCoord glVertex ...

Страница 143: ...mbolic constants GL_POINT GL_LINE and GL_FILL are accepted i1 i2 Specify the first and last integer values for grid domain variable i j1 j2 Specify the first and last integer values for grid domain variable j Description glMapGrid and glEvalMesh are used in tandem to efficiently generate and evaluate a series of evenly spaced map domain values glEvalMesh steps through the integer domain of a one o...

Страница 144: ...i i2 i 1 glEvalCoord2 i u u1 j v v1 glEvalCoord2 i u u1 j 1 v v1 glEnd If mode is GL_LINE then a call to glEvalMesh2 is equivalent to for j j1 j j2 j 1 glBegin GL_LINE_STRIP for i i1 i i2 i 1 glEvalCoord2 i u u1 j v v1 glEnd for i i1 i i2 i 1 glBegin GL_LINE_STRIP for j j1 j j1 j 1 glEvalCoord2 i u u1 j v v1 glEnd And finally if mode is GL_POINT then a call to glEvalMesh2 is equivalent to glBegin ...

Страница 145: ...cution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_MAP1_GRID_DOMAIN glGet with argument GL_MAP2_GRID_DOMAIN glGet with argument GL_MAP1_GRID_SEGMENTS glGet with argument GL_MAP2_GRID_SEGMENTS See Also glBegin glEvalCoord glEvalPoint glMap1 glMap2 glMapGrid ...

Страница 146: ...grid point in the same grid space that is traversed by glEvalMesh Calling glEvalPoint1 is equivalent to calling glEvalCoord1 i u u1 where u u2 u1 n and n u1 and u2 are the arguments to the most recentglMapGrid1 command The one absolute numeric requirement is that if i n then the value computed from i u u1 is exactly u2 In the two dimensional case glEvalPoint2 let u u2 u1 n v v2 v1 m where n u1 u2 ...

Страница 147: ...ociated Gets glGet with argument GL_MAP1_GRID_DOMAIN glGet with argument GL_MAP2_GRID_DOMAIN glGet with argument GL_MAP1_GRID_SEGMENTS glGet with argument GL_MAP2_GRID_SEGMENTS See Also glEvalCoord glEvalMesh glMap1 glMap2 glMapGrid ...

Страница 148: ...E glEvalPoint Chapter 5 148 ...

Страница 149: ...Chapter 6 149 6 F ...

Страница 150: ...edback mode is enabled by calling glRenderMode with argument GL_FEEDBACK Setting GL_FEEDBACK without establishing the feedback buffer or calling glFeedbackBuffer while the GL is in feedback mode is an error When glRenderMode is called while in feedback mode it returns the number of entries placed in the feedback array and resets the feedback array pointer to the base of the feedback buffer The ret...

Страница 151: ...assThru point GL_POINT_TOKEN vertex lineSegment GL_LINE_TOKEN vertex vertex GL_LINE_RESET_TOKEN vertex vertex polygon GL_POLYGON_TOKEN n polySpec polySpec polySpec vertex vertex vertex vertex bitmap GL_BITMAP_TOKEN vertex pixelRectangle GL_DRAW_PIXEL_TOKEN vertex GL_COPY_PIXEL_TOKEN vertex passThru GL_PASS_THROUGH_TOKEN value vertex 2d 3d 3dColor 3dColorTexture 4dColorTexture 2d value value 3d val...

Страница 152: ... GL_INVALID_ENUM is generated if type is not an accepted value GL_INVALID_VALUE is generated if size is negative GL_INVALID_OPERATION is generated if glFeedbackBuffer is called while the render mode is GL_FEEDBACK or if glRenderMode is called with argument GL_FEEDBACK before glFeedbackBuffer is called at least once GL_INVALID_OPERATION is generated if glFeedbackBuffer is executed between the execu...

Страница 153: ...f all previously called GL commands are complete Such effects include all changes to GL state all changes to connection state and all changes to the frame buffer contents Notes glFinish requires a round trip to the server Errors GL_INVALID_OPERATION is generated if glFinish is executed between the execution of glBegin and the corresponding execution of glEnd See Also glFlush ...

Страница 154: ...pleted in any particular time period it does complete in finite time Because any GL program might be executed over a network or on an accelerator that buffers commands all programs should call glFlush whenever they count on having all of their previously issued commands completed For example call glFlush before waiting for user input that depends on the generated image Notes glFlush can return at ...

Страница 155: ... values to be assigned to pname GL_FOG_COLOR requires an array of four values All other parameters accept an array containing only a single value Description Fog is initially disabled While enabled fog affects rasterized geometry bitmaps and pixel blocks but not buffer clear operations To enable and disable fog call glEnable and glDisable with argument GL_FOG glFog assigns the value or values in p...

Страница 156: ...g point values are mapped directly After conversion all color components are clamped to the range 0 1 The initial fog color is 0 0 0 0 Fog blends a fog color with each rasterized pixel fragment s post texturing color using a blending factor f Factor f is computed in one of three ways depending on the fog mode Let z be the distance in eye coordinates from the origin to the fragment being fogged The...

Страница 157: ...Enabled with argument GL_FOG glGet with argument GL_FOG_COLOR glGet with argument GL_FOG_INDEX glGet with argument GL_FOG_DENSITY glGet with argument GL_FOG_START glGet with argument GL_FOG_END glGet with argument GL_FOG_MODE See Also glEnable ...

Страница 158: ...tex and so on to its last vertex and finally back to its first vertex moves in a clockwise direction about the interior of the polygon The polygon s winding is said to be counterclockwise if the imaginary object following the same path moves in a counterclockwise direction about the interior of the polygon glFrontFace specifies whether polygons with clockwise winding in window coordinates or count...

Страница 159: ...rspective matrix that produces a perspective projection The current matrix see glMatrixMode is multiplied by this matrix and the result replaces the current matrix as if glMultMatrix were called with the following matrix as its argument E 0 A 0 0 F B 0 0 0 C D 0 0 1 0 where A right left right left B top bottom top bottom C far near far near D 2 far near far near E 2 near right left F 2 near top bo...

Страница 160: ... r bits of depth buffer precision are lost Because r approaches infinity as zNear approaches 0 zNear must never be set to 0 Errors GL_INVALID_VALUE is generated if zNear or zFar is not positive GL_INVALID_OPERATION is generated if glFrustum is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL...

Страница 161: ...Chapter 7 161 7 G ...

Страница 162: ...n such that range contiguous empty display lists named n n 1 n range 1 are created If range is 0 if there is no group of range contiguous names available or if any error is generated no display lists are generated and 0 is returned Errors GL_INVALID_VALUE is generated if range is negative GL_INVALID_OPERATION is generated if glGenLists is executed between the execution of glBegin and the correspon...

Страница 163: ...e the call to glGenTextures The generated textures have no dimensionality they assume the dimensionality of the texture target to which they are first bound see glBindTexture Texture names returned by a call to glGenTextures are not returned by subsequent calls unless they are first deleted with glDeleteTextures Notes glGenTextures is available only if the GL version is 1 1 or greater Errors GL_IN...

Страница 164: ...G glGenTextures Chapter 7 164 glTexImage1D glTexImage2D glTexParameter ...

Страница 165: ...ed if params has a different type than the state variable value being requested If glGetBooleanv is called a floating point or integer value is converted to GL_FALSE if and only if it is 0 0 or 0 Otherwise it is converted to GL_TRUE If glGetIntegerv is called boolean values are returned as GL_TRUE or GL_FALSE and most floating point values are rounded to the nearest integer value Floating point co...

Страница 166: ...T params returns a single boolean value indicating whether alpha testing of fragments is enabled The initial value is GL_FALSE See glAlphaFunc GL_ALPHA_TEST_FUNC params returns one value the symbolic name of the alpha test function The initial value is GL_ALWAYS See glAlphaFunc GL_ALPHA_TEST_REF params returns one value the reference value for the alpha test The initial value is 0 See glAlphaFunc ...

Страница 167: ...lientAttrib GL_CLIP_PLANEi params returns a single boolean value indicating whether the specified clipping plane is enabled The initial value is GL_FALSE See glClipPlane GL_COLOR_ARRAY params returns a single boolean value indicating whether the color array is enabled The initial value is GL_FALSE See glColorPointer GL_COLOR_ARRAY_SIZE params returns one value the number of components per color in...

Страница 168: ...TRUE GL_TRUE See glColorMask GL_CULL_FACE params returns a single boolean value indicating whether polygon culling is enabled The initial value is GL_FALSE See glCullFace GL_CULL_FACE_MODE params returns one value a symbolic constant indicating which polygon faces are to be culled The initial value is GL_BACK See glCullFace GL_CURRENT_COLOR params returns four values the red green blue and alpha v...

Страница 169: ... r and q current raster texture coordinates The initial value is 0 0 0 1 See glRasterPos and glTexCoord GL_CURRENT_TEXTURE_COORDS params returns four values the s t r and q current texture coordinates The initial value is 0 0 0 1 See glTexCoord GL_DEPTH_BIAS params returns one value the depth bias factor used during pixel transfers The initial value is 0 See glPixelTransfer GL_DEPTH_BITS params re...

Страница 170: ...is GL_FRONT GL_EDGE_FLAG params returns a single boolean value indicating whether the current edge flag is GL_TRUE or GL_FALSE The initial value is GL_TRUE See glEdgeFlag GL_EDGE_FLAG_ARRAY params returns a single boolean value indicating whether the edge flag array is enabled The initial value is GL_FALSE See glEdgeFlagPointer GL_EDGE_FLAG_ARRAY_STRIDE params returns one value the byte offset bet...

Страница 171: ... glFog GL_FOG_HINT params returns one value a symbolic constant indicating the mode of the fog hint The initial value is GL_DONT_CARE See glHint GL_FOG_INDEX params returns one value the fog color index The initial value is 0 See glFog GL_FOG_MODE params returns one value a symbolic constant indicating which fog equation is selected The initial value is GL_EXP See glFog GL_FOG_START params returns...

Страница 172: ...gle boolean value indicating whether a fragment s index values are merged into the frame buffer using a logical operation The initial value is GL_FALSE See glLogicOp GL_INDEX_MODE params returns a single boolean value indicating whether the GL is in color index mode GL_TRUE or RGBA mode GL_FALSE GL_INDEX_OFFSET params returns one value the offset added to color and stencil indices during pixel tra...

Страница 173: ...The initial value is GL_FALSE See glLineWidth GL_LINE_SMOOTH_HINT params returns one value a symbolic constant indicating the mode of the line anti aliasing hint The initial value is GL_DONT_CARE See glHint GL_LINE_STIPPLE params returns a single boolean value indicating whether stippling of lines is enabled The initial value is GL_FALSE See glLineStipple GL_LINE_STIPPLE_PATTERN params returns one...

Страница 174: ..._MAP1_INDEX params returns a single boolean value indicating whether 1D evaluation generates color indices The initial value is GL_FALSE See glMap1 GL_MAP1_NORMAL params returns a single boolean value indicating whether 1D evaluation generates normals The initial value is GL_FALSE See glMap1 GL_MAP1_TEXTURE_COORD_1 params returns a single boolean value indicating whether 1D evaluation generates 1D...

Страница 175: ...e is GL_FALSE See glMap2 GL_MAP2_TEXTURE_COORD_2 params returns a single boolean value indicating whether 2D evaluation generates 2D texture coordinates The initial value is GL_FALSE See glMap2 GL_MAP2_TEXTURE_COORD_3 params returns a single boolean value indicating whether 2D evaluation generates 3D texture coordinates The initial value is GL_FALSE See glMap2 GL_MAP2_TEXTURE_COORD_4 params return...

Страница 176: ...t least 8 See glLight GL_MAX_LIST_NESTING params returns one value the maximum recursion depth allowed during display list traversal The value must be at least 64 See glCallList GL_MAX_MODELVIEW_STACK_DEPTH params returns one value the maximum supported depth of the model view matrix stack The value must be at least 32 See glPushMatrix GL_MAX_NAME_STACK_DEPTH params returns one value the maximum s...

Страница 177: ...value is GL_FALSE See glNormalPointer GL_NORMAL_ARRAY_STRIDE params returns one value the byte offset between consecutive normals in the normal array The initial value is 0 See glNormalPointer GL_NORMAL_ARRAY_TYPE params returns one value the data type of each coordinate in the normal array The initial value is GL_FLOAT See glNormalPointer GL_NORMALIZE params returns a single boolean value indicat...

Страница 178: ...N_HINT params returns one value a symbolic constant indicating the mode of the perspective correction hint The initial value is GL_DONT_CARE See glHint GL_PIXEL_MAP_A_TO_A_SIZE params returns one value the size of the alpha to alpha pixel translation table The initial value is 1 See glPixelMap GL_PIXEL_MAP_B_TO_B_SIZE params returns one value the size of the blue to blue pixel translation table Th...

Страница 179: ...er anti aliasing of points is enabled The initial value is GL_FALSE See glPointSize GL_POINT_SMOOTH_HINT params returns one value a symbolic constant indicating the mode of the point anti aliasing hint The initial value is GL_DONT_CARE See glHint GL_POLYGON_MODE params returns two values symbolic constants indicating whether front facing and back facing polygons are rasterized as points lines or f...

Страница 180: ...ix on the top of the projection matrix stack Initially this matrix is the identity matrix See glPushMatrix GL_PROJECTION_STACK_DEPTH params returns one value the number of matrices on the projection matrix stack The initial value is 1 See glPushMatrix GL_READ_BUFFER params returns one value a symbolic constant indicating which color buffer is selected for reading The initial value is GL_BACK if th...

Страница 181: ...C params returns one value a symbolic constant indicating what function is used to compare the stencil reference value with the stencil buffer value The initial value is GL_ALWAYS See glStencilFunc GL_STENCIL_PASS_DEPTH_FAIL params returns one value a symbolic constant indicating what action is taken when the stencil test passes but the depth test fails The initial value is GL_KEEP See glStencilOp...

Страница 182: ...e name of the texture currently bound to the targetGL_TEXTURE_2D The initial value is 0 See glBindTexture GL_TEXTURE_COORD_ARRAY params returns a single boolean value indicating whether the texture coordinate array is enabled The initial value is GL_FALSE See glTexCoordPointer GL_TEXTURE_COORD_ARRAY_SIZE params returns one value the number of coordinates per element in the texture coordinate array...

Страница 183: ...is GL_FALSE See glPixelStore GL_UNPACK_ROW_LENGTH params returns one value the row length used for reading pixel data from memory The initial value is 0 See glPixelStore GL_UNPACK_SKIP_PIXELS params returns one value the number of pixel locations skipped before the first pixel is read from memory The initial value is 0 See glPixelStore GL_UNPACK_SKIP_ROWS params returns one value the number of row...

Страница 184: ...COLOR_ARRAY GL_COLOR_ARRAY_SIZE GL_COLOR_ARRAY_STRIDE GL_COLOR_ARRAY_TYPE GL_EDGE_FLAG_ARRAY GL_EDGE_FLAG_ARRAY_STRIDE GL_INDEX_ARRAY GL_INDEX_ARRAY_STRIDE GL_INDEX_ARRAY_TYPE GL_INDEX_LOGIC_OP GL_NORMAL_ARRAY GL_NORMAL_ARRAY_STRIDE GL_NORMAL_ARRAY_TYPE GL_POLYGON_OFFSET_UNITS GL_POLYGON_OFFSET_FACTOR GL_POLYGON_OFFSET_FILL GL_POLYGON_OFFSET_LINE GL_POLYGON_OFFSET_POINT GL_TEXTURE_COORD_ARRAY GL_T...

Страница 185: ...G glGet Chapter 7 185 glGetTexGen glGetTexImage glGetTexLevelParameter glGetTexParameter glIsEnabled ...

Страница 186: ...ntains a space separated list of extension names The extension names never contain spaces If there are no extensions to GLX then the empty string is returned The version string is laid out as follows major_version minor_version space vendor specific_info Both the major and minor portions of the version number are of arbitrary length The vendor specific information is optional However if it is pres...

Страница 187: ..._PLANES equation Returns four double precision values that are the coefficients of the plane equation of plane in eye coordinates The initial value is 0 0 0 0 Description glGetClipPlane returns in equation the four coefficients of the plane equation for plane Notes It is always the case that GL_CLIP_PLANEi GL_CLIP_PLANE0 i If an error is generated no change is made to the contents of equation Erro...

Страница 188: ...s one of the following GLX_USE_GL True if OpenGL rendering is supported by this visual False otherwise GLX_BUFFER_SIZE Number of bits per color buffer For RGBA visuals GLX_BUFFER_SIZE is the sum of GLX_RED_SIZE GLX_GREEN_SIZE GLX_BLUE_SIZE and GLX_ALPHA_SIZE For color index visuals GLX_BUFFER_SIZE is the size of the color indexes GLX_LEVEL Frame buffer level of the visual Level zero is the default...

Страница 189: ...el Windows or GLX pixmaps that will be rendered with OpenGL however must be instantiated with a color buffer depth of GLX_BUFFER_SIZE Although a GLX implementation can export many visuals that support GL rendering it must support at least one RGBA visual This visual must have at least one color buffer a stencil buffer of at least 1 bit a depth buffer of at least 12 bits and an accumulation buffer ...

Страница 190: ...XTENSION is returned if dpy does not support the GLX extension GLX_BAD_SCREEN is returned if the screen of vis does not correspond to a screen GLX_BAD_ATTRIBUTE is returned if attrib is not a valid GLX attribute GLX_BAD_VISUAL is returned if vis doesn t support GLX and an attribute other than GLX_USE_GL is requested See Also glXChooseVisual glXCreateContext ...

Страница 191: ...tion GLXContext glXGetCurrentContext void Description glXGetCurrentContext returns the current context as specified by glXMakeCurrent If there is no current context NULL is returned glXGetCurrentContext returns client side information It does not make a round trip to the server See Also glXCreateContext glXMakeCurrent ...

Страница 192: ...etCurrentDisplay returns the display for the current context If no context is current NULL is returned glXGetCurrentDisplay returns client side information It does not make a round trip to the server and therefore does not flush any pending events Notes glXGetCurrentDisplay is only supported if the GLX version is 1 2 or greater See Also glXQueryVersion glXQueryExtensionsString ...

Страница 193: ...on GLXDrawable glXGetCurrentDrawable void Description glXGetCurrentDrawable returns the current drawable as specified by glXMakeCurrent If there is no current drawable None is returned glXGetCurrentDrawable returns client side information It does not make a round trip to the server See Also glXCreateGLXPixmap glXMakeCurrent ...

Страница 194: ...value Thus glGetError should always be called in a loop until it returns GL_NO_ERROR if all error flags are to be reset Initially all error flags are set to GL_NO_ERROR The following errors are currently defined GL_NO_ERROR No error has been recorded The value of this symbolic constant is guaranteed to be 0 GL_INVALID_ENUM An unacceptable value is specified for an enumerated argument The offending...

Страница 195: ...ined only if GL_OUT_OF_MEMORY has occurred In all other cases the command generating the error is ignored and has no effect on the GL state or frame buffer contents If the generating command returns a value it returns 0 If glGetError itself generates an error it returns 0 Errors GL_INVALID_OPERATION is generated if glGetError is executed between the execution of glBegin and the corresponding execu...

Страница 196: ...N params Returns the requested data Description glGetLight returns in params the value or values of a light source parameter light names the light and is a symbolic name of the form GL_LIGHTi for 0 i GL_MAX_LIGHTS where GL_MAX_LIGHTS is an implementation dependent constant that is greater than or equal to eight pname specifies one of ten light source parameters again by symbolic name The following...

Страница 197: ...lues specified using glLight unless the modelview matrix was identity at the time glLight was called The initial value is 0 0 1 0 GL_SPOT_DIRECTION params returns three integer or floating point values representing the direction of the light source Integer values when requested are computed by rounding the internal floating point values to the nearest integer value The returned values are those ma...

Страница 198: ...alue representing the quadratic attenuation of the light An integer value when requested is computed by rounding the internal floating point representation to the nearest integer The initial value is 0 Notes It is always the case that GL_LIGHTi GL_LIGHT0 i If an error is generated no change is made to the contents of params Errors GL_INVALID_ENUM is generated if light or pname is not an accepted v...

Страница 199: ...D_4 GL_MAP2_VERTEX_3 and GL_MAP2_VERTEX_4 query Specifies which parameter to return Symbolic names GL_COEFF GL_ORDER and GL_DOMAIN are accepted v Returns the requested data Description glMap1 and glMap2 define evaluators glGetMap returns evaluator parameters target chooses a map query selects a specific parameter and v points to storage where the values will be returned The acceptable values for t...

Страница 200: ...d vorder The initial value is 1 1 GL_DOMAIN v returns the linear u and v mapping parameters One dimensional evaluators return two values u1 and u2 as specified by glMap1 Two dimensional evaluators return four values u1 u2 v1 and v2 as specified by glMap2 Integer values when requested are computed by rounding the internal floating point values to the nearest integer values Notes If an error is gene...

Страница 201: ...er or floating point values representing the ambient reflectance of the material Integer values when requested are linearly mapped from the internal floating point representation such that 1 0 maps to the most positive representable integer value and 1 0 maps to the most negative representable integer value If the internal value is outside the range 1 1 the corresponding integer return value is un...

Страница 202: ...rnal value is outside the range 1 1 0 the corresponding integer return value is undefined The initial value is 0 0 0 1 GL_SHININESS params returns one integer or floating point value representing the specular exponent of the material Integer values when requested are computed by rounding the internal floating point value to the nearest integer value The initial value is 0 GL_COLOR_INDEXES params r...

Страница 203: ...U_CULLING GLU_SAMPLING_TOLERANCE GLU_DISPLAY_MODE GLU_AUTO_LOAD_MATRIX GLU_PARAMETRIC_TOLERANCE GLU_SAMPLING_METHOD GLU_U_STEP and GLU_V_STEP data Specifies a pointer to the location into which the value of the named property is written Description gluGetNurbsProperty retrieves properties stored in a NURBS object These properties affect the way that NURBS curves and surfaces are rendered See the g...

Страница 204: ...r a description of the acceptable values for the map parameter glGetPixelMap returns in values the contents of the pixel map specified in map Pixel maps are used during the execution of glReadPixels glDrawPixels glCopyPixels glTexImage1D and glTexImage2D to map color indices stencil indices color components and depth components to other values Unsigned integer values if requested are linearly mapp...

Страница 205: ...ument GL_PIXEL_MAP_I_TO_R_SIZE glGet with argument GL_PIXEL_MAP_I_TO_G_SIZE glGet with argument GL_PIXEL_MAP_I_TO_B_SIZE glGet with argument GL_PIXEL_MAP_I_TO_A_SIZE glGet with argument GL_PIXEL_MAP_R_TO_R_SIZE glGet with argument GL_PIXEL_MAP_G_TO_G_SIZE glGet with argument GL_PIXEL_MAP_B_TO_B_SIZE glGet with argument GL_PIXEL_MAP_A_TO_A_SIZE glGet with argument GL_MAX_PIXEL_MAP_TABLE See Also gl...

Страница 206: ...VERTEX_ARRAY_POINTER are accepted params Returns the pointer value specified by pname Description glGetPointerv returns pointer information pname is a symbolic constant indicating the pointer to be returned and params is a pointer to a location in which to place the returned data Notes glGetPointerv is available only if the GL version is 1 1 or greater The pointers are all client side state The in...

Страница 207: ...G glGetPointer Chapter 7 207 glSelectBuffer glTexCoordPointer glVertexPointer ...

Страница 208: ... both height and width of 32 type of GL_BITMAP and format of GL_COLOR_INDEX were called and the stipple pattern were stored in an internal 32 32 color index buffer Unlike glReadPixels however pixel transfer operations shift offset pixel map are not applied to the returned stipple image Notes If an error is generated no change is made to the contents of mask Errors GL_INVALID_OPERATION is generated...

Страница 209: ...se the GL does not include queries for the performance characteristics of an implementation some applications are written to recognize known platforms and modify their GL usage based on known performance characteristics of these platforms Strings GL_VENDOR and GL_RENDERER together uniquely specify a platform They do not change from release to release and should be used by platform recognition algo...

Страница 210: ...ent versions or extensions glGetString always returns a compatible version number or list of extensions The release number always describes the server Errors GL_INVALID_ENUM is generated if name is not an accepted value GL_INVALID_OPERATION is generated if glGetString is executed between the execution of glBegin and the corresponding execution of glEnd ...

Страница 211: ...cific information Vendor specific information is optional Its format and contents depend on the implementation The standard GLU contains a basic set of features and capabilities If a company or group of companies wish to support other features these may be included as extensions to the GLU If name is GLU_EXTENSIONS then gluGetString returns a space separated list of names of supported GLU extensio...

Страница 212: ... value is to be fetched Valid values are GLU_TESS_WINDING_RULE GLU_TESS_BOUNDARY_ONLY and GLU_TESS_TOLERANCE data Specifies a pointer to the location into which the value of the named property is written Description gluGetTessProperty retrieves properties stored in a tessellation object These properties affect the way that tessellation objects are interpreted and rendered See the gluTessProperty r...

Страница 213: ...cifies a texture environment Currently only one texture environment is defined and supported GL_TEXTURE_ENV pname names a specific texture environment parameter as follows GL_TEXTURE_ENV_MODE params returns the single valued texture environment mode a symbolic constant The initial value is GL_MODULATE GL_TEXTURE_ENV_COLOR params returns four integer or floating point values that are the texture en...

Страница 214: ...e GL_hp_texture_lighting extension is supported Errors GL_INVALID_ENUM is generated if target or pname is not an accepted value GL_INVALID_OPERATION is generated if glGetTexEnv is executed between the execution of glBegin and the corresponding execution of glEnd See Also glTexEnv ...

Страница 215: ...neration plane equations GL_OBJECT_PLANE or GL_EYE_PLANE params Returns the requested data Description glGetTexGen returns in params selected parameters of a texture coordinate generation function that was specified using glTexGen coord names one of the s t r q texture coordinates using the symbolic constant GL_S GL_T GL_R or GL_Q pname specifies one of three symbolic names GL_TEXTURE_GEN_MODE par...

Страница 216: ...intained in eye coordinates They are not equal to the values specified using glTexGen unless the modelview matrix was identity when glTexGen was called Notes If an error is generated no change is made to the contents of params Errors GL_INVALID_ENUM is generated if coord or pname is not an accepted value GL_INVALID_OPERATION is generated if glGetTexGen is executed between the execution of glBegin ...

Страница 217: ... into pixels target specifies whether the desired texture image is one specified by glTexImage1D GL_TEXTURE_1D or by glTexImage2D GL_TEXTURE_2D level specifies the level of detail number of the desired image format and type specify the format and type of the desired image array See the reference pages glTexImage1D and glDrawPixels for a description of the acceptable values for the format and type ...

Страница 218: ... based on format and type Be sure to take the pixel storage parameters into account especially GL_PACK_ALIGNMENT Notes If an error is generated no change is made to the contents of pixels Errors GL_INVALID_ENUM is generated if target format or type is not an accepted value GL_INVALID_VALUE is generated if level is less than 0 GL_INVALID_VALUE may be generated if level is greater than log sub 2 max...

Страница 219: ...SIZE GL_TEXTURE_BLUE_SIZE GL_TEXTURE_ALPHA_SIZE GL_TEXTURE_LUMINANCE_SIZE and GL_TEXTURE_INTENSITY_SIZE are accepted params Returns the requested data Description glGetTexLevelParameter returns in params texture parameter values for a specific level of detail value specified as level target defines the target texture either GL_TEXTURE_1D GL_TEXTURE_2D GL_PROXY_TEXTURE_1D or GL_PROXY_TEXTURE_2D GL_...

Страница 220: ...ernal storage resolution of an individual component The resolution chosen by the GL will be a close match for the resolution requested by the user with the component argument of glTexImage1D or glTexImage2D The initial value is 0 Notes If an error is generated no change is made to the contents of params GL_TEXTURE_INTERNAL_FORMAT is only available if the GL version is 1 1 or greater In version 1 0...

Страница 221: ...G glGetTexLevelParameter Chapter 7 221 glTexEnv glTexGen glTexImage1D glTexImage2D glTexSubImage1D glTexSubImage2D glTexParameter ...

Страница 222: ..._TEXTURE_COMPARE_EXT GL_TEXTURE_COMPARE_OPERATOR_EXT and GL_TEXTURE_RESIDENT are accepted params Returns the texture parameters Description glGetTexParameter returns in params the value or values of the texture parameter specified as pname target defines the target texture either GL_TEXTURE_1D or GL_TEXTURE_2D to specify one or two dimensional texturing pname accepts the same symbols as glTexParam...

Страница 223: ...er GL_TRUE or GL_FALSE GL_TEXTURE_COMPARE_EXT Returns the single valued flag which determines whether depth texture comparison is enabled either GL_TRUE or GL_FALSE GL_TEXTURE_COMPARE_OPERATOR_EXT Returns the single valued depth texture comparison operator a symbolic constant GL_TEXTURE_RESIDENT Returns the residence status of the target texture If the value returned in params is GL_TRUE the textu...

Страница 224: ...G glGetTexParameter Chapter 7 224 See Also glAreTexturesResident glPrioritizeTextures glTexParameter ...

Страница 225: ...Chapter 8 225 8 H ...

Страница 226: ...indicating the desired behavior The initial value for each target is GL_DONT_CARE mode can be one of the following GL_FASTEST The most efficient option should be chosen GL_NICEST The most correct or highest quality option should be chosen GL_DONT_CARE No preference Though the implementation aspects that can be hinted are well defined the interpretation of the hints depends on the implementation Th...

Страница 227: ...g generated during rasterization GL_POLYGON_SMOOTH_HINT Indicates the sampling quality of anti aliased polygons Hinting GL_NICEST can result in more pixel fragments being generated during rasterization if a larger filter function is applied GL_BUFFER_SWAP_MODE_HINT_hp GL_FASTEST switches to the faster double buffering method and GL_NICEST switches to the slower double buffering method Notes The in...

Страница 228: ...H glHint Chapter 8 228 ...

Страница 229: ...Chapter 9 229 9 I ...

Страница 230: ...ies a pointer to a one element array that contains the new value for the current color index Description glIndex updates the current single valued color index It takes one argument the new value for the current color index The current index is stored as a floating point value Integer values are converted directly to floating point values with no special mapping The initial value is 1 Index values ...

Страница 231: ... only if the GL version is 1 1 or greater The current index can be updated at any time In particular glIndex can be called between a call to glBegin and the corresponding call to glEnd Associated Gets glGet with argument GL_CURRENT_INDEX See Also glColor glIndexPointer ...

Страница 232: ... in a color index buffer specify a mask Where a 1 one appears in the mask it s possible to write to the corresponding bit in the color index buffer or buffers Where a 0 zero appears the corresponding bit is write protected This mask is used only in color index mode and it affects only the buffers currently selected for writing see glDrawBuffer Initially all bits are enabled for writing Errors GL_I...

Страница 233: ... array storage may be more efficient on some implementations see glInterleavedArrays type stride and pointer are saved as client side state The color index array is initially disabled To enable and disable the array call glEnableClientState and glDisableClientState with the argument GL_INDEX_ARRAY If enabled the color index array is used when glDrawArrays glDrawElements or glArrayElement is called...

Страница 234: ...nerated if type is not an accepted value GL_INVALID_VALUE is generated if stride is negative Associated Gets glIsEnabled with argument GL_INDEX_ARRAY glGet with argument GL_INDEX_ARRAY_TYPE glGet with argument GL_INDEX_ARRAY_STRIDE glGetPointerv with argument GL_INDEX_ARRAY_POINTER See Also glArrayElement glColorPointer glDrawArrays glDrawElements glEdgeFlagPointer glEnable glGetPointer glInterlea...

Страница 235: ...s the name stack to be initialized to its default empty state The name stack is always empty while the render mode is not GL_SELECT Calls to glInitNames while the render mode is not GL_SELECT are ignored Errors GL_INVALID_OPERATION is generated if glInitNames is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_NAME_STACK_DEPT...

Страница 236: ...inning of the next aggregate array element format serves as a key describing the extraction of individual arrays from the aggregate array If format contains a T then texture coordinates are extracted from the interleaved array If C is present color values are extracted If N is present normal coordinates are extracted Vertex coordinates are always extracted The digits 2 3 and 4 denote how many valu...

Страница 237: ...se glPushClientAttrib and glPopClientAttrib instead Errors GL_INVALID_ENUM is generated if format is not an accepted value GL_INVALID_VALUE is generated if stride is negative See Also glArrayElement glColorPointer glDrawArrays glDrawElements glEdgeFlagPointer glEnableClientState glGetPointer glIndexPointer glNormalPointer glTexCoordPointer glVertexPointer ...

Страница 238: ...ible visual If more control of the selection process is required use XGetVisualInfo and glXGetConfig to select among all the available visuals Use the selected visual to create both a GLX context and an X drawable GLX contexts are created with glXCreateContext and drawables are created with either XCreateWindow or glXCreateGLXPixmap Finally bind the context and the drawable together using glXMakeC...

Страница 239: ...dpy attributeListSgl if vi NULL vi glXChooseVisual dpy DefaultScreen dpy attributeListDbl swap_flag TRUE create a GLX context cx glXCreateContext dpy vi 0 GL_TRUE create a color map cmap XCreateColormap dpy RootWindow dpy vi screen vi visual AllocNone create a window swa colormap cmap swa border_pixel 0 swa event_mask StructureNotifyMask win XCreateWindow dpy RootWindow dpy vi screen 0 0 100 100 0...

Страница 240: ...turned by glXQueryExtensionsString For example if the EXT_visual_info extension is supported then this token will be defined in glx h and EXT_visual_info will appear in the extension string returned by glXQueryExtensionsString The definitions in glx h can be used at compile time to determine if procedure calls corresponding to an extension exist in the library GLX 1 1 and GLX 1 2 GLX 1 2 is now su...

Страница 241: ...map glXDestroyContext glXGetClientString glXGetConfig glXIsDirect glXMakeCurrent glXQueryExtension glXQueryExtensionsString glXQueryServerString glXQueryVersion glXSwapBuffers glXUseXFont glXWaitGL glXWaitX XCreateColormap XCreateWindow XSync ...

Страница 242: ... context that is being queried Description glXIsDirect returns True if ctx is a direct rendering context False otherwise Direct rendering contexts pass rendering commands directly from the calling process s address space to the rendering system bypassing the X server Non direct rendering contexts pass all rendering commands to the X server Errors GLXBadContext is generated if ctx is not a valid GL...

Страница 243: ... enabled The following capabilities are accepted for cap Constant See GL_ALPHA_TEST glAlphaFunc GL_AUTO_NORMAL glEvalCoord GL_BLEND glBlendFunc glLogicOp GL_CLIP_PLANEi glClipPlane GL_COLOR_ARRAY glColorPointer GL_COLOR_LOGIC_OP glLogicOp GL_COLOR_MATERIAL glColorMaterial GL_CULL_FACE glCullFace GL_DEPTH_TEST glDepthFunc glDepthRange GL_DITHER glEnable GL_EDGE_FLAG_ARRAY glEdgeFlagPointer GL_FOG g...

Страница 244: ...OOTH glPolygonMode GL_POLYGON_OFFSET_FILL glPolygonOffset GL_POLYGON_OFFSET_LINE glPolygonOffset GL_POLYGON_OFFSET_POINT glPolygonOffset GL_POLYGON_STIPPLE glPolygonStipple GL_RESCALE_NORMAL_EXT glEnable GL_SCISSOR_TEST glScissor GL_STENCIL_TEST glStencilFunc glStencilOp GL_TEXTURE_1D glTexImage1D GL_TEXTURE_2D glTexImage2D GL_TEXTURE_3D_EXT if 3D texturing is supported glTexImage3DEXT GL_TEXTURE_...

Страница 245: ...T_LINE GL_POLYGON_OFFSET_POINT GL_TEXTURE_COORD_ARRAY and GL_VERTEX_ARRAY are only available if the GL version is 1 1 or greater Errors GL_INVALID_ENUM is generated if cap is not an accepted value GL_INVALID_OPERATION is generated if glIsEnabled is executed between the execution of glBegin and the corresponding execution of glEnd See Also glEnable glEnableClientState ...

Страница 246: ...st Specifies a potential display list name Description glIsList returns GL_TRUE if list is the name of a display list and returns GL_FALSE otherwise Errors GL_INVALID_OPERATION is generated if glIsList is executed between the execution of glBegin and the corresponding execution of glEnd See Also glCallList glCallLists glDeleteLists glGenLists glNewList ...

Страница 247: ...re If texture is zero or is a non zero value that is not currently the name of a texture or if an error occurs glIsTexture returns GL_FALSE Notes glIsTexture is available only if the GL version is 1 1 or greater Errors GL_INVALID_OPERATION is generated if glIsTexture is executed between the execution of glBegin and the corresponding execution of glEnd See Also glBindTexture glCopyTexImage1D glCopy...

Страница 248: ...I glIsTexture Chapter 9 248 ...

Страница 249: ...Chapter 10 249 10 L ...

Страница 250: ...ued light source parameter for light GL_SPOT_EXPONENT GL_SPOT_CUTOFF GL_CONSTANT_ATTENUATION GL_LINEAR_ATTENUATION and GL_QUADRATIC_ATTENUATION are accepted param Specifies the value that parameter pname of light source light will be set to light Specifies a light The number of lights depends on the implementation but at least eight lights are supported They are identified by symbolic names of the...

Страница 251: ...l value for GL_LIGHT0 is 1 1 1 1 for other lights the initial value is 0 0 0 0 GL_SPECULAR params contains four integer or floating point values that specify the specular RGBA intensity of the light Integer values are mapped linearly such that the most positive representable value maps to 1 0 and the most negative representable value maps to 1 0 Floating point values are mapped directly Neither in...

Страница 252: ...t and the direction from the light to the vertex being lighted is greater than the spot cutoff angle the light is completely masked Otherwise its intensity is controlled by the spot exponent and the attenuation factors The initial spot cutoff is 180 resulting in uniform light distribution GL_CONSTANT_ATTENUATION GL_LINEAR_ATTENUATION GL_QUADRATIC_ATTENUATION params is a single integer or floating ...

Страница 253: ...L glLight Chapter 10 253 Associated Gets glGetLight glIsEnabled with argument GL_LIGHTING See Also glColorMaterial glLightModel glMaterial ...

Страница 254: ...IGHT_MODEL_AMBIENT GL_LIGHT_MODEL_LOCAL_VIEWER and GL_LIGHT_MODEL_TWO_SIDE are accepted params Specifies a pointer to the value or values that params will be set to Description glLightModel sets the lighting model parameter pname names a parameter and params gives the new value There are three lighting model parameters GL_LIGHT_MODEL_AMBIENT params contains four integer or floating point values th...

Страница 255: ...uct of the material ambient reflectance and the light s ambient intensity The diffuse light source contribution is the product of the material diffuse reflectance the light s diffuse intensity and the dot product of the vertex s normal with the normalized vector from the vertex to the light source The specular light source contribution is the product of the material specular reflectance the light ...

Страница 256: ...L glLightModel Chapter 10 256 See Also glLight glMaterial ...

Страница 257: ...ever glBegin is called and before each line segment of a glBegin GL_LINES glEnd sequence is generated It is incremented after each fragment of a unit width aliased line segment is generated or after each i fragments of an i width line segment are generated The i fragments associated with count s are masked out if pattern bit s factor mod 16 0 otherwise these fragments are sent to the frame buffer ...

Страница 258: ...neStipple Chapter 10 258 Associated Gets glGet with argument GL_LINE_STIPPLE_PATTERN glGet with argument GL_LINE_STIPPLE_REPEAT glIsEnabled with argument GL_LINE_STIPPLE See Also glLineWidth glPolygonStipple ...

Страница 259: ...rectangle having width equal to the current line width length equal to the actual length of the line and centered on the mathematical line segment The coverage value for each fragment is the window coordinate area of the intersection of the rectangular region with the corresponding pixel square This value is saved and used in the final rasterization step Not all widths can be supported when line a...

Страница 260: ...is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_LINE_WIDTH glGet with argument GL_LINE_WIDTH_RANGE glGet with argument GL_LINE_WIDTH_GRANULARITY glIsEnabled with argument GL_LINE_SMOOTH See Also glEnable ...

Страница 261: ...ay list names The initial value is 0 Description glCallLists specifies an array of offsets Display list names are generated by adding base to each offset Names that reference valid display lists are executed the others are ignored Errors GL_INVALID_OPERATION is generated if glListBase is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with a...

Страница 262: ...oadMatrix with the identity matrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 but in some cases it is more efficient Errors GL_INVALID_OPERATION is generated if glLoadIdentity is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL_MODELVIEW_MATRIX glGet with argument GL_PROJECTION_MATRIX glGet with argume...

Страница 263: ...ormation of coordinates For instance assume M refers to the modelview matrix If v v 0 v 1 v 2 v 3 is the set of object coordinates of a vertex and m points to an array of 16 single or double precision floating point values m 0 m 1 m 15 then the modelview transformation M v does the following m 0 m 4 m 8 m 12 v 0 Mv m 1 m 5 m 9 m 13 v 1 m 2 m 6 m 10 m 14 v 2 m 3 m 7 m 11 m 15 v 3 Where denotes matr...

Страница 264: ...Associated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL_MODELVIEW_MATRIX glGet with argument GL_PROJECTION_MATRIX glGet with argument GL_TEXTURE_MATRIX See Also glLoadIdentity glMatrixMode glMultMatrix glPushMatrix ...

Страница 265: ...to replace the value on the top of the name stack which is initially empty The name stack is always empty while the render mode is not GL_SELECT Calls to glLoadName while the render mode is not GL_SELECT are ignored Errors GL_INVALID_OPERATION is generated if glLoadName is called while the name stack is empty GL_INVALID_OPERATION is generated if glLoadName is executed between the execution of glBe...

Страница 266: ...e sampling and culling matrices stored in nurb The sampling matrix determines how finely a NURBS curve or surface must be tessellated to satisfy the sampling tolerance as determined by the GLU_SAMPLING_TOLERANCE property The culling matrix is used in deciding if a NURBS curve or surface should be culled before rendering when the GLU_CULLING property is turned on gluLoadSamplingMatrices is necessar...

Страница 267: ...lue is GL_COPY Description glLogicOp specifies a logical operation that when enabled is applied between the incoming color index or RGBA color and the color index or RGBA color at the corresponding location in the frame buffer To enable or disable the logical operation call glEnable and glDisable using the symbolic constant GL_COLOR_LOGIC_OP for RGBA mode or GL_INDEX_LOGIC_OP for color index mode ...

Страница 268: ...y if the GL version is 1 1 or greater When more than one RGBA color or index buffer is enabled for drawing logical operations are performed separately for each enabled buffer using for the destination value the contents of that buffer see glDrawBuffer Errors GL_INVALID_ENUM is generated if opcode is not an accepted value GL_INVALID_OPERATION is generated if glLogicOp is executed between the execut...

Страница 269: ...erence point indicating the center of the scene and an up vector The matrix maps the reference point to the negative Z axis and the eye point to the origin When a typical projection matrix is used the center of the scene therefore maps to the center of the viewport Similarly the direction described by the up vector projected onto the viewing plane is mapped to the positive Y axis so that it points...

Страница 270: ...L gluLookAt Chapter 10 270 M s 0 s 1 s 2 0 u 0 u 1 u 2 0 f 0 f 1 f 2 0 0 0 0 1 and gluLookAt is equivalent to glMultMatrixf M glTranslated eyex eyey eyez See Also glFrustum gluPerspective ...

Страница 271: ...Chapter 11 271 11 M ...

Страница 272: ...s the current rendering context with ctx there can be only one current context per thread Pending commands to the previous context if any are flushed before it is released The first time ctx is made current to any thread its viewport is set to the full size of drawable Subsequent calls by any thread to glXMakeCurrent with ctx have no effect on its viewport To release the current context without as...

Страница 273: ... generated if glXMakeCurrent is executed between the execution of glBegin and the corresponding execution of glEnd GLXBadContextState is also generated if the rendering context current to the calling thread has GL renderer state GL_FEEDBACK or GL_SELECT GLXBadCurrentWindow is generated if there are pending GL commands for the previous context and the current drawable is a window that is no longer ...

Страница 274: ... specified by this command stride Specifies the number of floats or doubles between the beginning of one control point and the beginning of the next one in the data structure referenced in points This allows control points to be embedded in arbitrary data structures The only constraint is that the values for a particular control point must occupy contiguous memory locations order Specifies the num...

Страница 275: ...ne dimensional maps that are enabled When glEvalCoord1 presents a value u the Bernstein functions are evaluated using û where Equation 11 4 target is a symbolic constant that indicates what kind of control points are provided in points and what output is generated when the map is evaluated It can assume one of nine predefined values GL_MAP1_VERTEX_3 Each control point is three floating point value...

Страница 276: ...values representing the s t and r texture coordinates Internal glTexCoord3 commands are generated when the map is evaluated but the current texture coordinates are not updated with the value of these glTexCoord commands GL_MAP1_TEXTURE_COORD_4 Each control point is four floating point values representing the s t r and q texture coordinates Internal glTexCoord4 commands are generated when the map i...

Страница 277: ...R glIsEnabled with argument GL_MAP1_VERTEX_3 glIsEnabled with argument GL_MAP1_VERTEX_4 glIsEnabled with argument GL_MAP1_INDEX glIsEnabled with argument GL_MAP1_COLOR_4 glIsEnabled with argument GL_MAP1_NORMAL glIsEnabled with argument GL_MAP1_TEXTURE_COORD_1 glIsEnabled with argument GL_MAP1_TEXTURE_COORD_2 glIsEnabled with argument GL_MAP1_TEXTURE_COORD_3 glIsEnabled with argument GL_MAP1_TEXTU...

Страница 278: ...L_MAP2_TEXTURE_COORD_2 GL_MAP2_TEXTURE_COORD_3 and GL_MAP2_TEXTURE_COORD_4 are accepted u1 u2 Specify a linear mapping of u as presented to glEvalCoord2 to û one of the two variables that are evaluated by the equations specified by this command Initially u1 is 0 and u2 is 1 ustride Specifies the number of floats or doubles between the beginning of control point Rij and the beginning of control poi...

Страница 279: ...o use polynomial or rational polynomial mapping to produce vertices normals texture coordinates and colors The values produced by an evaluator are sent on to further stages of GL processing just as if they had been presented using glVertex glNormal glTexCoord and glColor commands except that the generated values do not update the current normal texture coordinates or color All polynomial or ration...

Страница 280: ... evaluated GL_MAP2_INDEX Each control point is a single floating point value representing a color index Internal glIndex commands are generated when the map is evaluated but the current index is not updated with the value of these glIndex commands GL_MAP2_COLOR_4 Each control point is four floating point values representing red green blue and alpha Internal glColor4 commands are generated when the...

Страница 281: ...which map is being defined There are uorder vorder control points in the array ustride specifies how many float or double locations are skipped to advance the internal memory pointer from control point Rij to control point R i 1 j vstride specifies how many float or double locations are skipped to advance the internal memory pointer from control point Rij to control point Ri j 1 Notes As is the ca...

Страница 282: ...P2_INDEX glIsEnabled with argument GL_MAP2_COLOR_4 glIsEnabled with argument GL_MAP2_NORMAL glIsEnabled with argument GL_MAP2_TEXTURE_COORD_1 glIsEnabled with argument GL_MAP2_TEXTURE_COORD_2 glIsEnabled with argument GL_MAP2_TEXTURE_COORD_3 glIsEnabled with argument GL_MAP2_TEXTURE_COORD_4 See Also glBegin glColor glEnable glEvalCoord glEvalMesh glEvalPoint glMap1 glMapGrid glNormal glTexCoord gl...

Страница 283: ...ifies the number of partitions in the grid range interval u1 u2 Must be positive u1 u2 Specify the mappings for integer grid domain values i 0 and i un vn Specifies the number of partitions in the grid range interval v1 v2 glMapGrid2 only v1 v2 Specify the mappings for integer grid domain values j 0 and j vn glMapGrid2 only Description glMapGrid and glEvalMesh are used together to efficiently gene...

Страница 284: ...ctly to u1 and integer grid coordinate i un exactly to u2 The other maps integer grid coordinate j 0 exactly to v1 and integer grid coordinate j vn exactly to v2 Other integer grid coordinates i and j are mapped such that u i u2 u1 un u1 v j v2 v1 vn v1 The mappings specified by glMapGrid are used identically by glEvalMesh and glEvalPoint Errors GL_INVALID_VALUE is generated if either un or vn is ...

Страница 285: ...e set to face Specifies which face or faces are being updated Must be one of GL_FRONT GL_BACK or GL_FRONT_AND_BACK pname Specifies the material parameter of the face or faces that is being updated Must be one of GL_AMBIENT GL_DIFFUSE GL_SPECULAR GL_EMISSION GL_SHININESS GL_AMBIENT_AND_DIFFUSE or GL_COLOR_INDEXES params Specifies a pointer to the value or values that pname will be set to Descriptio...

Страница 286: ... value maps to 1 0 Floating point values are mapped directly Neither integer nor floating point values are clamped The initial diffuse reflectance for both front and back facing materials is 0 8 0 8 0 8 1 0 GL_SPECULAR params contains four integer or floating point values that specify the specular RGBA reflectance of the material Integer values are mapped linearly such that the most positive repre...

Страница 287: ...ng Notes The material parameters can be updated at any time In particular glMaterial can be called between a call to glBegin and the corresponding call to glEnd If only a single material parameter is to be changed per vertex however glColorMaterial is preferred over glMaterial see glColorMaterial Errors GL_INVALID_ENUM is generated if either face or pname is not an accepted value GL_INVALID_VALUE ...

Страница 288: ...quent matrix operations to the modelview matrix stack GL_PROJECTION Applies subsequent matrix operations to the projection matrix stack GL_TEXTURE Applies subsequent matrix operations to the texture matrix stack To find out which matrix stack is currently the target of all matrix operations call glGet with argument GL_MATRIX_MODE The initial value is GL_MODELVIEW Errors GL_INVALID_ENUM is generate...

Страница 289: ...ix modelview matrix or the texture matrix Examples If the current matrix is C and the coordinates to be transformed are v v 0 v 1 v 2 v 3 Then the current transformation is C v or C 0 C 4 C 8 C 12 v 0 C 1 C 5 C 9 C 13 v 1 C 2 C 6 C 10 C 14 v 2 C 3 C 7 C 11 C 15 v 3 Calling glMultMatrix with an argument of m m 0 m 1 m 15 replaces the current transformation with C m v or C 0 C 4 C 8 C 12 m 0 m 4 m 8...

Страница 290: ...anslation matrix the translation is done directly on the coordinates to be transformed while the rotation is done on the results of that translation Errors GL_INVALID_OPERATION is generated if glMultMatrix is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL_MODELVIEW_MATRIX glGet with argume...

Страница 291: ...Chapter 12 291 12 N ...

Страница 292: ...mands are merely compiled GL_COMPILE_AND_EXECUTE Commands are executed as they are compiled into the display list Certain commands are not compiled into the display list but are executed immediately regardless of the display list mode These commands are glColorPointer glDeleteLists glDisableClientState glEdgeFlagPointer glEnableClientState glFeedbackBuffer glFinish glFlush glGenLists glIndexPointe...

Страница 293: ...enerated if mode is not an accepted value GL_INVALID_OPERATION is generated if glEndList is called without a preceding glNewList or if glNewList is called while a display list is being defined GL_INVALID_OPERATION is generated if glNewList or glEndList is executed between the execution of glBegin and the corresponding execution of glEnd GL_OUT_OF_MEMORY is generated if there is insufficient memory...

Страница 294: ... the test in the current position of the array specified by glVisiblityBufferhp and beginning the next test whose results will be placed in the subsequent entry of the array Visibility Testing is enabled by a call to glEnable VISIBILITY_TEST_hp Making this call to glEnable if VISIBILITY_TEST_hp has not already been enabled causes Visibility Testing to begin and sets the result destination to be th...

Страница 295: ...cription gluNewNurbsRenderer creates and returns a pointer to a new NURBS object This object must be referred to when calling NURBS rendering and control functions A return value of 0 means that there is not enough memory to allocate the object See Also gluBeginCurve gluBeginSurface gluBeginTrim gluDeleteNurbsRenderer gluNurbsCallback gluNurbsProperty ...

Страница 296: ...rns a pointer to a new quadrics object This object must be referred to when calling quadrics rendering and control functions A return value of 0 means that there is not enough memory to allocate the object See Also gluCylinder gluDeleteQuadric gluDisk gluPartialDisk gluQuadricCallback gluQuadricDrawStyle gluQuadricNormals gluQuadricOrientation gluQuadricTexture gluSphere ...

Страница 297: ...or gluNewTess void Description gluNewTess creates and returns a pointer to a new tessellation object This object must be referred to when calling tessellation functions A return value of 0 means that there is not enough memory to allocate the object See Also gluTessBeginPolygon gluDeleteTess gluTessCallback ...

Страница 298: ...s process can be repeated until all contours have been described type defines what type of contour follows The legal contour types are as follows GLU_EXTERIOR An exterior contour defines an exterior boundary of the polygon GLU_INTERIOR An interior contour defines an interior boundary of the polygon such as a hole GLU_UNKNOWN An unknown contour is analyzed by the library to determine if it is inter...

Страница 299: ...luNextContour is not called before the first contour then the first contour is marked GLU_EXTERIOR This command is obsolete and is provided for backward compatibility only Calls to gluNextContour are mapped to gluTessEndContour followed by gluTessBeginContour See Also gluBeginPolygon gluNewTess gluTessCallback gluTessVertex gluTessBeginContour ...

Страница 300: ...Lfloat ny GLfloat nz void glNormal3i GLint nx GLint ny GLint nz void glNormal3s GLshort nx GLshort ny GLshort nz void glNormal3bv const GLbyte v void glNormal3dv const GLdouble v void glNormal3fv const GLfloat v void glNormal3iv const GLint v void glNormal3sv const GLshort v Parameters nx ny nz Specify the x y and z coordinates of the new current normal The initial value of the current normal is t...

Страница 301: ...d not have unit length If normalization is enabled then normals specified with glNormal are normalized after transformation To enable and disable normalization call glEnable and glDisable with the argument GL_NORMALIZE Normalization is initially disabled Notes The current normal can be updated at any time In particular glNormal can be called between a call to glBegin and the corresponding call to ...

Страница 302: ...eparate arrays Single array storage may be more efficient on some implementations see glInterleavedArrays When a normal array is specified type stride and pointer are saved as client side state To enable and disable the normal array call glEnableClientState and glDisableClientState with the argument GL_NORMAL_ARRAY If enabled the normal array is used when glDrawArrays glDrawElements or glArrayElem...

Страница 303: ...ated if type is not an accepted value GL_INVALID_VALUE is generated if stride is negative Associated Gets glIsEnabled with argument GL_NORMAL_ARRAY glGet with argument GL_NORMAL_ARRAY_TYPE glGet with argument GL_NORMAL_ARRAY_STRIDE glGetPointerv with argument GL_NORMAL_ARRAY_POINTER See Also glArrayElement glColorPointer glDrawArrays glDrawElements glEdgeFlagPointer glEnable glGetPointerv glIndexP...

Страница 304: ...ription gluNurbsCallback is used to define a callback to be used by a NURBS object If the specified callback is already defined then it is replaced If CallBackFunc is NULL then any existing callback is erased The one legal callback is GLU_ERROR GLU_ERROR The error function is called when an error is encountered Its single argument is of type GLenum and it indicates the specific error that occurred...

Страница 305: ...rve order equals degree 1 hence a cubic curve has an order of 4 type Specifies the type of the curve If this curve is defined within a gluBeginCurve gluEndCurve pair then the type can be any of the valid one dimensional evaluator types such as GL_MAP1_VERTEX_3 or GL_MAP1_COLOR_4 Between a gluBeginCurve gluEndCurve pair the only valid types are GLU_MAP1_TRIM_2 and GLU_MAP1_TRIM_3 Description Use gl...

Страница 306: ... then it describes a curve in two dimensional u and v parameter space If it is GLU_MAP1_TRIM_3 then it describes a curve in two dimensional homogeneous u v and w parameter space See the gluBeginTrim reference page for more discussion about trimming curves Notes To define trim curves that stitch well use gluPwlCurve See Also gluBeginCurve gluBeginTrim gluNewNurbsRenderer gluPwlCurve ...

Страница 307: ...s affect the way that a NURBS curve is rendered The accepted values for property are as follows GLU_SAMPLING_METHOD Specifies how a NURBS surface should be tessellated value may be one of GLU_PATH_LENGTH GLU_PARAMETRIC_ERROR or GLU_DOMAIN_DISTANCE When set to GLU_PATH_LENGTH the surface is rendered so that the maximum length in pixels of the edges of the tessellation polygons is no greater than wh...

Страница 308: ...tessellation When value is set to GLU_OUTLINE_PATCH just the outlines of patches and trim curves defined by the user are drawn The initial value is GLU_FILL GLU_CULLING value is a boolean value that when set to GL_TRUE indicates that a NURBS curve should be discarded prior to tessellation if its control points lie outside the current viewport The initial value is GL_FALSE GLU_AUTO_LOAD_MATRIX valu...

Страница 309: ..._STEP or a value of GLU_PATH_LENGTH GLU_PARAMETRIC_ERROR GLU_DOMAIN_DISTANCE are only available if the GLU version is 1 1 or greater They are not valid parameters in GLU 1 0 gluGetString can be used to determine the GLU version See Also gluGetNurbsProperty gluLoadSamplingMatrices gluNewNurbsRenderer gluGetString ...

Страница 310: ... a number of single precision floating point values between successive control points in the parametric u direction in control tStride Specifies the offset in single precision floating point values between successive control points in the parametric v direction in control control Specifies an array containing control points for the NURBS surface The offsets between successive control points in the...

Страница 311: ...face between a gluBeginSurface gluEndSurface pair No more than one call to gluNurbsSurface for each of color position and texture data can be made within a single gluBeginSurface gluEndSurface pair Exactly one call must be made to describe the position of the surface a type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4 A NURBS surface can be trimmed by using the commands gluNurbsCurve and gluPwlCurve be...

Страница 312: ...N gluNurbsSurface Chapter 12 312 ...

Страница 313: ...Chapter 13 313 13 O ...

Страница 314: ...ping planes zNear zFar Specify the distances to the nearer and farther depth clipping planes These values are negative if the plane is to be behind the viewer Description glOrtho describes a transformation that produces a parallel projection The current matrix see glMatrixMode is multiplied by this matrix and the result replaces the current matrix as if glMultMatrix were called with the following ...

Страница 315: ...clipping plane Both zNear and zFar can be either positive or negative Use glPushMatrix and glPopMatrix to save and restore the current matrix stack Errors GL_INVALID_OPERATION is generated if glOrtho is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL_MODELVIEW_MATRIX glGet with argument GL_...

Страница 316: ...ottom GLdouble top Parameters left right Specify the coordinates for the left and right vertical clipping planes bottom top Specify the coordinates for the bottom and top horizontal clipping planes Description gluOrtho2D sets up a two dimensional orthographic viewing region This is equivalent to calling glOrtho with near 1 and far 1 See Also glOrtho gluPerspective ...

Страница 317: ...Chapter 14 317 14 P ...

Страница 318: ...ilar to a full disk except that only the subset of the disk from start through start sweep is included where 0 degrees is along the Y axis 90 degrees along the X axis 180 along the Y axis and 270 along the X axis The partial disk has a radius of outer and contains a concentric circular hole with a radius of inner If inner is 0 then no hole is generated The partial disk is subdivided around the Z a...

Страница 319: ...P gluPartialDisk Chapter 14 319 See Also gluCylinder gluDisk gluNewQuadric gluQuadricOrientation gluQuadricTexture gluSphere ...

Страница 320: ... the GL See the glFeedbackBuffer reference page for a description of the feedback buffer and the values in it glPassThrough inserts a user defined marker in the feedback buffer when it is executed in feedback mode token is returned as if it were a primitive it is indicated with its own unique identifying value GL_PASS_THROUGH_TOKEN The order of glPassThrough commands with respect to the specificat...

Страница 321: ...ription gluPerspective specifies a viewing frustum into the world coordinate system In general the aspect ratio in gluPerspective should match the aspect ratio of the associated viewport For example aspect 2 0 means the viewer s angle of view is twice as wide in X as it is in Y If the viewport is twice as wide as it is tall it displays the image without distortion The matrix generated by gluPerspe...

Страница 322: ...io of zFar to zNear is the less effective the depth buffer will be at distinguishing between surfaces that are near each other If r zFar zNear roughly log2 r bits of depth buffer precision are lost Because r approaches infinity as zNear approaches 0 zNear must never be set to 0 See Also glFrustum glLoadIdentity glMultMatrix gluOrtho2D ...

Страница 323: ... selection mode with glRenderMode and re render the scene All primitives that would have been drawn near the cursor are identified and stored in the selection buffer The matrix created by gluPickMatrix is multiplied by the current matrix just as if glMultMatrix is called with the generated matrix To effectively use the generated pick matrix for picking first call glLoadIdentity to load an identity...

Страница 324: ... being defined values Specifies an array of mapsize values Description glPixelMap sets up translation tables or maps used by glCopyPixels glCopyTexImage1D glCopyTexImage2D glCopyTexSubImage1D glCopyTexSubImage2D glDrawPixels glReadPixels glTexImage1D glTexImage2D glTexSubImage1D and glTexSubImage2D Use of these maps is described completely in the glPixelTransfer reference page and partly in the re...

Страница 325: ...tly to the internal floating point format of these maps then clamped to the range 0 1 Unsigned integer values specified by glPixelMapusv and glPixelMapuiv are converted linearly such that the largest representable integer maps to 1 0 and 0 maps to 0 0 Maps that store indices GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S retain their values in fixed point format with an unspecified number of bits to ...

Страница 326: ...gument GL_PIXEL_MAP_I_TO_I_SIZE glGet with argument GL_PIXEL_MAP_S_TO_S_SIZE glGet with argument GL_PIXEL_MAP_I_TO_R_SIZE glGet with argument GL_PIXEL_MAP_I_TO_G_SIZE glGet with argument GL_PIXEL_MAP_I_TO_B_SIZE glGet with argument GL_PIXEL_MAP_I_TO_A_SIZE glGet with argument GL_PIXEL_MAP_R_TO_R_SIZE glGet with argument GL_PIXEL_MAP_G_TO_G_SIZE map Lookup Index Lookup Value Initial Size Initial Va...

Страница 327: ...argument GL_PIXEL_MAP_A_TO_A_SIZE glGet with argument GL_MAX_PIXEL_MAP_TABLE See Also glCopyPixels glCopyTexImage1D glCopyTexImage2D glCopyTexSubImage1D glCopyTexSubImage2D glDrawPixels glPixelStore glPixelTransfer glReadPixels glTexImage1D glTexImage2D glTexSubImage1D glTexSubImage2D ...

Страница 328: ...unpacking of polygon stipple patterns see glPolygonStipple bitmaps see glBitmap and texture patterns see glTexImage1D glTexImage2D glTexSubImage1D and glTexSubImage2D pname is a symbolic constant indicating the parameter to be set and param is the new value Six of the twelve storage parameters affect how pixel data is returned to client memory and are therefore significant only for glReadPixels co...

Страница 329: ...r example has three components per pixel first red then green and finally blue GL_PACK_SKIP_PIXELS and GL_PACK_SKIP_ROWS These values are provided as a convenience to the programmer they provide no functionality that cannot be duplicated simply by incrementing the pointer passed to glReadPixels Setting GL_PACK_SKIP_PIXELS to i is equivalent to incrementing the pointer by in components or indices w...

Страница 330: ... obtained by skipping components or indices where n is the number of components or indices in a pixel l is the number of pixels in a row GL_UNPACK_ROW_LENGTH if it is greater than 0 the width argument to the pixel routine otherwise a is the value of GL_UNPACK_ALIGNMENT and s is the size in bytes of a single component if a s then it is as if a s In the case of 1 bit values the location of the next ...

Страница 331: ...so be used to set any of the pixel store parameters Boolean parameters are set to false if param is 0 and true otherwise Notes The pixel storage modes in effect when glDrawPixels glReadPixels glTexImage1D glTexImage2D glTexSubImage1D glTexSubImage2D glBitmap or glPolygonStipple is placed in a display list control the interpretation of memory data The pixel storage modes in effect when a display li...

Страница 332: ...ACK_SWAP_BYTES glGet with argument GL_PACK_LSB_FIRST glGet with argument GL_PACK_ROW_LENGTH glGet with argument GL_PACK_SKIP_ROWS glGet with argument GL_PACK_SKIP_PIXELS glGet with argument GL_PACK_ALIGNMENT glGet with argument GL_UNPACK_SWAP_BYTES glGet with argument GL_UNPACK_LSB_FIRST glGet with argument GL_UNPACK_ROW_LENGTH glGet with argument GL_UNPACK_SKIP_ROWS glGet with argument GL_UNPACK_...

Страница 333: ...1D glCopyTexSubImage2D and glReadPixels or unpacked from client memory glDrawPixels glTexImage1D glTexImage2D glTexSubImage1D and glTexSubImage2D Pixel transfer operations happen in the same order and in the same manner regardless of the command that resulted in the pixel operation Pixel storage modes see glPixelStore control the unpacking of pixels being read from client memory and the packing of...

Страница 334: ...lor index Each color index is shifted left by GL_INDEX_SHIFT bits any bits beyond the number of fraction bits carried by the fixed point index are filled with zeros If GL_INDEX_SHIFT is negative the shift is to the right again zero filled Then GL_INDEX_OFFSET is added to the index GL_INDEX_SHIFT and GL_INDEX_OFFSET are specified with glPixelTransfer From this point operation diverges depending on ...

Страница 335: ...ers are set to false if param is 0 and to true otherwise param is converted to floating point before being assigned to real valued parameters Notes If a glCopyPixels glCopyTexImage1D glCopyTexImage2D glCopyTexSubImage1D glCopyTexSubImage2D glDrawPixels glReadPixels glTexImage1D glTexImage2D glTexSubImage1D or glTexSubImage2D command is placed in a display list see glNewList and glCallList the pixe...

Страница 336: ...NDEX_OFFSET glGet with argument GL_RED_SCALE glGet with argument GL_RED_BIAS glGet with argument GL_GREEN_SCALE glGet with argument GL_GREEN_BIAS glGet with argument GL_BLUE_SCALE glGet with argument GL_BLUE_BIAS glGet with argument GL_ALPHA_SCALE glGet with argument GL_ALPHA_BIAS glGet with argument GL_DEPTH_SCALE glGet with argument GL_DEPTH_BIAS See Also glCallList glCopyPixels glCopyTexImage1D...

Страница 337: ...he pixel rectangle then pixels whose centers are in the rectangle with corners at xr n xfactor yr m 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 pos...

Страница 338: ...e is even the center point is xw 5 yw 5 and the rasterized fragment s centers are the half integer window coordinates within the square of the rounded size centered at x y All pixel fragments produced in rasterizing a non anti aliased point are assigned the same associated data that of the vertex corresponding to the point If anti aliasing is enabled then point rasterization produces a fragment fo...

Страница 339: ...m cannot be queried it must be no less than the maximum value for anti aliased points rounded to the nearest integer value Errors GL_INVALID_VALUE is generated if size is less than or equal to 0 GL_INVALID_OPERATION is generated if glPointSize is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_POINT_SIZE glGet with argument ...

Страница 340: ...lygons In particular a polygon s vertices are lit and the polygon is clipped and possibly culled before these modes are applied Three modes are defined and can be specified in mode GL_POINT Polygon vertices that are marked as the start of a boundary edge are drawn as points Point attributes such as GL_POINT_SIZE and GL_POINT_SMOOTH control the rasterization of the points Polygon rasterization attr...

Страница 341: ...rated internally by the GL when it decomposes polygons they can be set explicitly using glEdgeFlag Errors GL_INVALID_ENUM is generated if either face or mode is not an accepted value GL_INVALID_OPERATION is generated if glPolygonMode is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_POLYGON_MODE See Also glBegin glEdgeFlag ...

Страница 342: ...n area of the polygon and r is the smallest value that is guaranteed to produce a resolvable offset for a given implementation The offset is added before the depth test is performed and before the value is written into the depth buffer glPolygonOffset is useful for rendering hidden line images for applying decals to surfaces and for rendering solids with highlighted edges Notes glPolygonOffset is ...

Страница 343: ...P glPolygonOffset Chapter 14 343 See Also glDepthFunc glDisable glEnable glGet glIsEnabled glLineWidth glStencilOp glTexEnv ...

Страница 344: ...sented as a 32 32 array of 1 bit color indices packed in unsigned bytes glPixelStore parameters like GL_UNPACK_SWAP_BYTES and GL_UNPACK_LSB_FIRST affect the assembling of the bits into a stipple pattern Pixel transfer operations shift offset pixel map are not applied to the stipple image however To enable and disable polygon stippling call glEnable and glDisable with argument GL_POLYGON_STIPPLE Po...

Страница 345: ...P glPolygonStipple Chapter 14 345 See Also glDrawPixels glLineStipple glPixelStore glPixelTransfer ...

Страница 346: ...res that are not resident By specifying a priority for each texture glPrioritizeTextures allows applications to guide the GL implementation in determining which textures should be resident The priorities given in priorities are clamped to the range 0 1 before they are assigned 0 indicates the lowest priority textures with priority 0 are least likely to be resident 1 indicates the highest priority ...

Страница 347: ...eTextures is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGetTexParameter with parameter name GL_TEXTURE_PRIORITY retrieves the priority of a currently bound texture See Also glAreTexturesResident glBindTexture glCopyTexImage1D glCopyTexImage2D glTexImage1D glTexImage2D glTexParameter ...

Страница 348: ...turn the computed window coordinates Description gluProject transforms the specified object coordinates into window coordinates using model proj and view The result is stored in winX winY and winZ A return value of GL_TRUE indicates success a return value of GL_FALSE indicates failure To compute the coordinates let v objX objY objZ 1 0 represented as a matrix with 4 rows and 1 column Then gluProje...

Страница 349: ...nstructed by ORing several of these constants together The special mask GL_ALL_ATTRIB_BITS can be used to save all stackable states The symbolic mask constants and their associated GL state are as follows the second column lists which attributes are saved GL_ACCUM_BUFFER_BIT Accumulation buffer clear value GL_COLOR_BUFFER_BIT GL_ALPHA_TEST enable bit Alpha test function and reference value GL_BLEN...

Страница 350: ...bit GL_ENABLE_BIT GL_ALPHA_TEST flag GL_AUTO_NORMAL flag GL_BLEND flag Enable bits for the user definable clipping planes GL_COLOR_MATERIAL GL_CULL_FACE flag GL_DEPTH_TEST flag GL_DITHER flag GL_FOG flag GL_LIGHTi where 0 i GL_MAX_LIGHTS GL_LIGHTING flag GL_LINE_SMOOTH flag GL_LINE_STIPPLE flag GL_COLOR_LOGIC_OP flag GL_INDEX_LOGIC_OP flag GL_MAP1_x where x is a map type GL_MAP2_x where x is a map...

Страница 351: ...bit GL_COLOR_MATERIAL_FACE value Color material parameters that are tracking the current color Ambient scene color GL_LIGHT_MODEL_LOCAL_VIEWER value GL_LIGHT_MODEL_TWO_SIDE setting GL_LIGHTING enable bit Enable bit for each light Ambient diffuse and specular intensity for each light Direction position exponent and cutoff angle for each light Constant linear and quadratic attenuation factors for ea...

Страница 352: ...size GL_POLYGON_BIT GL_CULL_FACE enable bit GL_CULL_FACE_MODE value GL_FRONT_FACE indicator GL_POLYGON_MODE setting GL_POLYGON_SMOOTH flag GL_POLYGON_STIPPLE enable bit GL_POLYGON_OFFSET_FILL flag GL_POLYGON_OFFSET_LINE flag GL_POLYGON_OFFSET_POINT flag GL_POLYGON_OFFSET_FACTOR GL_POLYGON_OFFSET_UNITS GL_POLYGON_STIPPLE_BIT Polygon stipple image GL_SCISSOR_BIT GL_SCISSOR_TEST flag Scissor box GL_S...

Страница 353: ...k is full GL_STACK_UNDERFLOW is generated if glPopAttrib is called while the attribute stack is empty GL_INVALID_OPERATION is generated if glPushAttrib or glPopAttrib is executed between the execution of glBegin and the corresponding execution of glEnd GL_TEXTURE_BIT Enable bits for the four texture coordinates Border color for each texture image Minification function for each texture image Magnif...

Страница 354: ..._DEPTH glGet with argument GL_MAX_ATTRIB_STACK_DEPTH See Also glGet glGetClipPlane glGetError glGetLight glGetMap glGetMaterial glGetPixelMap glGetPolygonStipple glGetString glGetTexEnv glGetTexGen glGetTexImage glGetTexLevelParameter glGetTexParameter glIsEnabled glPushClientAttrib ...

Страница 355: ...ch attributes are saved glPopClientAttrib restores the values of the client state variables saved with the last glPushClientAttrib Those not saved are left unchanged It is an error to push attributes onto a full client attribute stack or to pop attributes off an empty stack In either case the error flag is set and no other change is made to GL state Initially the client attribute stack is empty No...

Страница 356: ... glPopClientAttrib is called while the attribute stack is empty Associated Gets glGet with argument GL_ATTRIB_STACK_DEPTH glGet with argument GL_MAX_CLIENT_ATTRIB_STACK_DEPTH See Also glColorPointer glDisableClientState glEdgeFlagPointer glEnableClientState glGet glGetError glIndexPointer glNormalPointer glNewList glPixelStore glPushAttrib glTexCoordPointer glVertexPointer ...

Страница 357: ...rix It is an error to push a full matrix stack or to pop a matrix stack that contains only a single matrix In either case the error flag is set and no other change is made to GL state Errors GL_STACK_OVERFLOW is generated if glPushMatrix is called while the current matrix stack is full GL_STACK_UNDERFLOW is generated if glPopMatrix is called while the current matrix stack contains only a single ma...

Страница 358: ...P glPushMatrix Chapter 14 358 See Also glFrustum glLoadIdentity glLoadMatrix glMatrixMode glMultMatrix glOrtho glRotate glScale glTranslate glViewport ...

Страница 359: ...tion It is an error to push a name onto a full stack or to pop a name off an empty stack It is also an error to manipulate the name stack between the execution of glBegin and the corresponding execution of glEnd In any of these cases the error flag is set and no other change is made to GL state The name stack is always empty while the render mode is not GL_SELECT Calls to glPushName or glPopName w...

Страница 360: ...P glPushName Chapter 14 360 See Also glInitNames glLoadName glRenderMode glSelectBuffer ...

Страница 361: ...e A piece wise linear curve consists of a list of coordinates of points in the parameter space for the NURBS surface to be trimmed These points are connected with line segments to form a curve If the curve is an approximation to a curve that is not piece wise linear the points should be close enough in parameter space that the resulting path appears curved at the resolution used in the application...

Страница 362: ...P gluPwlCurve Chapter 14 362 ...

Страница 363: ...Chapter 15 363 15 Q ...

Страница 364: ...pecifies the function to be called Description gluQuadricCallback is used to define a new callback to be used by a quadrics object If the specified callback is already defined then it is replaced If CallBackFunc is NULL then any existing callback is erased The one legal callback is GLU_ERROR GLU_ERROR The function is called when an error is encountered Its single argument is of type GLenum and it ...

Страница 365: ...uQuadricDrawStyle specifies the draw style for quadrics rendered with quad The legal values are as follows GLU_FILL Quadrics are rendered with polygon primitives The polygons are drawn in a counterclockwise fashion with respect to their normals as defined with gluQuadricOrientation GLU_LINE Quadrics are rendered as a set of lines GLU_SILHOUETTE Quadrics are rendered as a set of lines except that e...

Страница 366: ... the desired type of normals Valid values are GLU_NONE GLU_FLAT and GLU_SMOOTH Description gluQuadricNormals specifies what kind of normals are desired for quadrics rendered with quad The legal values are as follows GLU_NONE No normals are generated GLU_FLAT One normal is generated for every facet of a quadric GLU_SMOOTH One normal is generated for every vertex of a quadric This is the initial val...

Страница 367: ...ired orientation Valid values are GLU_OUTSIDE and GLU_INSIDE Description gluQuadricOrientation specifies what kind of orientation is desired for quadrics rendered with quad The orientation values are as follows GLU_OUTSIDE Quadrics are drawn with normals pointing outward the initial value GLU_INSIDE Quadrics are drawn with normals pointing inward Note that the interpretation of outward and inward ...

Страница 368: ...dicating if texture coordinates should be generated Description gluQuadricTexture specifies if texture coordinates should be generated for quadrics rendered with quad If the value of texture is GL_TRUE then texture coordinates are generated and if texture is GL_FALSE they are not The initial value is GL_FALSE The manner in which texture coordinates are generated depends upon the specific quadric r...

Страница 369: ...Base Returns the base event code of the GLX server extension Description glXQueryExtension returns True if the X server of connection dpy supports the GLX extension False otherwise If True is returned then errorBase and eventBase return the error base and event base of the GLX extension Otherwise errorBase and eventBase are unchanged errorBase and eventBase do not return values if they are specifi...

Страница 370: ...g describing which GLX extensions are supported on the connection The string is null terminated and contains a space separated list of extension names The extension names themselves never contain spaces If there are no extensions to GLX then the empty string is returned Notes glXQueryExtensionsString is available only if the GLX version is 1 1 or greater glXQueryExtensionsString only returns infor...

Страница 371: ...e aspect of the server s GLX extension The possible values for name and the format of the strings is the same as for glXGetClientString If name is not set to a recognized value NULL is returned Notes glXQueryServerString is available only if the GLX version is 1 1 or greater If the GLX version is 1 1 or 1 0 the GL version must be 1 0 If the GLX version is 1 2 the GL version must be 1 1 glXQuerySer...

Страница 372: ...Q glXQueryVersion Chapter 15 372 glXQueryVersion ...

Страница 373: ...Chapter 16 373 16 R ...

Страница 374: ...4iv glRasterPos4sv specify the raster position for pixel operations C Specification void glRasterPos2d GLdouble x GLdouble y void glRasterPos2f GLfloat x GLfloat y void glRasterPos2i GLint x GLint y void glRasterPos2s GLshort x GLshort y void glRasterPos3d GLdouble x GLdouble y GLdouble z void glRasterPos3f GLfloat x GLfloat y GLfloat z void glRasterPos3i GLint x GLint y GLint z void glRasterPos3s...

Страница 375: ...Specify the x y z and w object coordinates if present for the raster position v Specifies a pointer to an array of two three or four elements specifying x y z and w coordinates respectively Description The GL maintains a 3D position in window coordinates This position called the raster position is used to position pixel and bitmap write operations It is maintained with subpixel accuracy See glBitm...

Страница 376: ...NT_TEXTURE_COORDS based on the texture matrix and the texture generation functions see glTexGen Finally the distance from the origin of the eye coordinate system to the vertex as transformed by only the modelview matrix replaces GL_CURRENT_RASTER_DISTANCE Initially the current raster position is 0 0 0 1 the current raster distance is 0 the valid bit is set the associated RGBA color is 1 1 1 1 the ...

Страница 377: ...ent GL_CURRENT_RASTER_COLOR glGet with argument GL_CURRENT_RASTER_INDEX glGet with argument GL_CURRENT_RASTER_TEXTURE_COORDS See Also glBitmap glCopyPixels glDrawElements glDrawPixels glLight glLightModel glShadeModel glTexCoord glTexGen glVertex ...

Страница 378: ...T_LEFT all name the front left buffer GL_FRONT_RIGHT and GL_RIGHT name the front right buffer and GL_BACK_LEFT and GL_BACK name the back left buffer Non stereo double buffered configurations have only a front left and a back left buffer Single buffered configurations have a front left and a front right buffer if stereo and only a front left buffer if non stereo It is an error to specify a nonexist...

Страница 379: ...R glReadBuffer Chapter 16 379 See Also glCopyPixels glCopyTexImage1D glCopyTexImage2D glCopyTexSubImage1D glCopyTexSubImage2D glDrawBuffer glReadPixels ...

Страница 380: ...be one of GL_UNSIGNED_BYTE GL_BYTE GL_BITMAP GL_UNSIGNED_SHORT GL_SHORT GL_UNSIGNED_INT GL_INT or GL_FLOAT pixels Returns the pixel data Description glReadPixels returns pixel data from the frame buffer starting with the pixel whose lower left corner is at location x y into client memory starting at location pixels Several parameters control the processing of the pixel data before it is placed int...

Страница 381: ... tables GL_PIXEL_MAP_I_TO_R GL_PIXEL_MAP_I_TO_G GL_PIXEL_MAP_I_TO_B Each table must be of size 2n but n may be different for different tables Before an index is used to look up a value in a table of size 2n it must be masked against 2n 1 If RGBA color components are stored in the color buffers they are read from the color buffer selected by glReadBuffer Each color component is converted to floatin...

Страница 382: ...us space in pixels Storage parameters set by glPixelStore such as GL_PACK_LSB_FIRST and GL_PACK_SWAP_BYTES affect the way that data is written into memory See glPixelStore for a description Notes Values for pixels that lie outside the window connected to the current GL context are undefined If an error is generated no change is made to the contents of pixels Errors GL_INVALID_ENUM is generated if ...

Страница 383: ...is generated if glReadPixels is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_INDEX_MODE See Also glCopyPixels glDrawPixels glPixelMap glPixelStore glPixelTransfer glReadBuffer ...

Страница 384: ... GLint x2 GLint y2 void glRects GLshort x1 GLshort y1 GLshortx2 GLshort y2 void glRectdv const GLdouble v1 const GLdouble v2 void glRectfv const GLfloat v1 const GLfloat v2 void glRectiv const GLint v1 const GLint v2 void glRectsv const GLshort v1 const GLshort v2 Parameters x1 y1 Specify one vertex of a rectangle x2 y2 Specify the opposite vertex of the rectangle v1 Specifies a pointer to one ver...

Страница 385: ...tangle is defined in the z 0 plane glRect x1 y1 x2 y2 is exactly equivalent to the following sequence glBegin GL_POLYGON glVertex2 x1 y1 glVertex2 x2 y1 glVertex2 x2 y2 glVertex2 x1 y2 glEnd Note that if the second vertex is above and to the right of the first vertex the rectangle is constructed with a counter clockwise winding Errors GL_INVALID_OPERATION is generated if glRect is executed between...

Страница 386: ...if the render mode had been GL_RENDER is returned in a select buffer which must be created see glSelectBuffer before selection mode is entered GL_FEEDBACK Feedback mode No pixel fragments are produced and no change to the frame buffer contents is made Instead the coordinates and attributes of vertices that would have been drawn if the render mode had been GL_RENDER is returned in a feedback buffer...

Страница 387: ...ument GL_SELECT before glSelectBuffer is called at least once GL_INVALID_OPERATION is generated if glFeedbackBuffer is called while the render mode is GL_FEEDBACK or if glRenderMode is called with argument GL_FEEDBACK before glFeedbackBuffer is called at least once GL_INVALID_OPERATION is generated if glRenderMode is executed between the execution of glBegin and the corresponding execution of glEn...

Страница 388: ...trixMode is multiplied by a rotation matrix with the product replacing the current matrix as if glMultMatrix were called with the following matrix as its argument xx 1 c c xy 1 c xz 1 c 0 zs ys yx 1 c zs yy 1 c c yz 1 c 0 xs zx 1 c zy 1 c zz 1 c c 0 ys xs 0 0 0 1 Where c cos angle s sin angle and x y z 1 if not the GL will normalize this vector If the matrix mode is either GL_MODELVIEW or GL_PROJE...

Страница 389: ...he execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL_MODELVIEW_MATRIX glGet with argument GL_PROJECTION_MATRIX glGet with argument GL_TEXTURE_MATRIX See Also glMatrixMode glMultMatrix glPushMatrix glScale glTranslate ...

Страница 390: ...R glRotate Chapter 16 390 ...

Страница 391: ...Chapter 17 391 17 S ...

Страница 392: ...matrix and the product replaces the current matrix as if glScale were called with the following matrix as its argument x 0 0 0 0 y 0 0 0 0 z 0 0 0 0 1 If the matrix mode is either GL_MODELVIEW or GL_PROJECTION all objects drawn after glScale is called are scaled Use glPushMatrix and glPopMatrix to save and restore the unscaled coordinate system Notes If scale factors other than 1 are applied to th...

Страница 393: ...ated Gets glGet with argument GL_MATRIX_MODE glGet with argument GL_MODELVIEW_MATRIX glGet with argument GL_PROJECTION_MATRIX glGet with argument GL_TEXTURE_MATRIX See Also glMatrixMode glMultMatrix glPushMatrix glRotate glTranslate ...

Страница 394: ...UNSIGNED_BYTE GL_BYTE GL_BITMAP GL_UNSIGNED_SHORT GL_SHORT GL_UNSIGNED_INT GL_INT or GL_FLOAT dataIn Specifies a pointer to the source image wOut hOut Specify the width and height respectively of the destination image typeOut Specifies the data type for dataOut Must be one of GL_UNSIGNED_BYTE GL_BYTE GL_BITMAP GL_UNSIGNED_SHORT GL_SHORT GL_UNSIGNED_INT GL_INT or GL_FLOAT dataOut Specifies a pointe...

Страница 395: ...rString See the glReadPixels reference page for a description of the acceptable values for format typeIn and typeOut Errors GLU_INVALID_VALUE is returned if wIn hIn wOut r hOut is negative GLU_INVALID_ENUM is returned if format typeIn or typeOut is not one of the accepted values See Also glDrawPixels glReadPixels gluBuild1DMipmaps gluBuild2DMipmaps gluErrorString ...

Страница 396: ...sor test call glEnable and glDisable with argument GL_SCISSOR_TEST The test is initially disabled While the test is enabled only pixels that lie within the scissor box can be modified by drawing commands Window coordinates have integer values at the shared corners of frame buffer pixels glScissor 0 0 1 1 allows modification of only the lower left pixel in the window and glScissor 0 0 0 0 doesn t a...

Страница 397: ...S glScissor Chapter 17 397 See Also glEnable glViewport ...

Страница 398: ... called a hit record is copied to buffer if any hits have occurred since the last such event name stack change or glRenderMode call The hit record consists of the number of names in the name stack at the time of the event followed by the minimum and maximum depth values of all vertices that hit since the previous event followed by the name stack contents bottom name first Depth values which are in...

Страница 399: ...ve GL_INVALID_OPERATION is generated if glSelectBuffer is called while the render mode is GL_SELECT or if glRenderMode is called with argument GL_SELECT before glSelectBuffer is called at least once GL_INVALID_OPERATION is generated if glSelectBuffer is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_NAME_STACK_DEPTH See Als...

Страница 400: ...color of a vertex is the result of lighting if lighting is enabled or it is the current color at the time the vertex was specified if lighting is disabled Flat and smooth shading are indistinguishable for points Starting when glBegin is issued and counting vertices and primitives from 1 the GL gives each flat shaded line segment i the computed color of vertex i 1 its second vertex Counting similar...

Страница 401: ...s any value other than GL_FLAT or GL_SMOOTH GL_INVALID_OPERATION is generated if glShadeModel is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_SHADE_MODEL See Also glBegin glColor glLight glLightModel ...

Страница 402: ... sphere is subdivided around the Z axis into slices and along the Z axis into stacks similar to lines of longitude and latitude If the orientation is set to GLU_OUTSIDE with gluQuadricOrientation then any normals generated point away from the center of the sphere Otherwise they point toward the center of the sphere If texturing is turned on with gluQuadricTexture then texture coordinates are gener...

Страница 403: ...utlining and constructive solid geometry rendering The stencil test conditionally eliminates a pixel based on the outcome of a comparison between the reference value and the value in the stencil buffer To enable and disable the test call glEnable and glDisable with argument GL_STENCIL_TEST To specify actions based on the outcome of the stencil test call glStencilOp func is a symbolic constant that...

Страница 404: ...here is no stencil buffer no stencil modification can occur and it is as if the stencil test always passes Errors GL_INVALID_ENUM is generated if func is not one of the eight accepted values GL_INVALID_OPERATION is generated if glStencilFunc is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGet with argument GL_STENCIL_FUNC glGet with argument ...

Страница 405: ...significant n bits of mask where n is the number of bits in the stencil buffer specify a mask Where a 1 appears in the mask it s possible to write to the corresponding bit in the stencil buffer Where a 0 appears the corresponding bit is write protected Initially all bits are enabled for writing Errors GL_INVALID_OPERATION is generated if glStencilMask is executed between the execution of glBegin a...

Страница 406: ... a per pixel basis You draw into the stencil planes using GL drawing primitives then render geometry and images using the stencil planes to mask out portions of the screen Stenciling is typically used in multipass rendering algorithms to achieve special effects such as decals outlining and constructive solid geometry rendering The stencil test conditionally eliminates a pixel based on the outcome ...

Страница 407: ...e is no depth buffer or when the depth buffer is not enabled In these cases fail and zpass specify stencil action when the stencil test fails and passes respectively Notes Initially the stencil test is disabled If there is no stencil buffer no stencil modification can occur and it is as if the stencil tests always pass regardless of any call to glStencilOp Errors GL_INVALID_ENUM is generated if fa...

Страница 408: ...plicit glFlush before it returns Subsequent GL commands can be issued immediately after calling glXSwapBuffers but are not executed until the buffer exchange is completed If drawable was not created with respect to a double buffered visual glXSwapBuffers has no effect and no error is generated Notes Synchronization of multiple GLX contexts rendering to the same double buffered window is the respon...

Страница 409: ...Chapter 18 409 18 T ...

Страница 410: ...nd gluTessEndContour delimit the definition of a polygon contour Within each gluTessBeginContour gluTessEndContour pair there can be zero or more calls to gluTessVertex The vertices specify a closed contour the last vertex of each contour is automatically linked to the first See the gluTessVertex reference page for more details gluTessBeginContour can only be called between gluTessBeginPolygon and...

Страница 411: ... more calls to gluTessVertex The vertices specify a closed contour the last vertex of each contour is automatically linked to the first See the gluTessVertex gluTessBeginContour and gluTessEndContour reference pages for more details data is a pointer to a user defined data structure If the appropriate callback s are specified see gluTessCallback then this pointer is returned to the callback functi...

Страница 412: ...comes undefined These callbacks are used by the tessellation object to describe how a polygon specified by the user is broken into triangles Note that there are two versions of each callback one with user specified polygon data and one without If both versions of a particular callback are specified then the callback with user specified polygon data will be used Note that the polygon_data parameter...

Страница 413: ...he GLU_TESS_EDGE_FLAG callback except that it takes an additional pointer argument This pointer is identical to the opaque pointer provided when gluTessBeginPolygon was called The function prototype for this callback is void edgeFlagData GLboolean flag void polygon_data GLU_TESS_VERTEX The vertex callback is invoked between the begin and end callbacks It is similar to glVertex and it defines the v...

Страница 414: ... gluTessEndPolygon is called For example if the polygon lies in an arbitrary plane in 3 space and a color is associated with each vertex the GLU_TESS_COMBINE callback might look like this void myCombine GLdouble coords 3 VERTEX d 4 GLfloat w 4 VERTEX dataOut VERTEX new new_vertex new x coords 0 new y coords 1 new z coords 2 new r w 0 d 0 r w 1 d 1 r w 2 d 2 r w 3 d 3 r new g w 0 d 0 g w 1 d 1 g w ...

Страница 415: ...rtex coordinate exceeded the predefined constant GLU_TESS_MAX_COORD in absolute value and that the value has been clamped Coordinate values must be small enough so that two can be multiplied together without overflow GLU_TESS_NEED_COMBINE_CALLBACK indicates that the tessellation detected an intersection between two edges in the input data and the GLU_TESS_COMBINE or GLU_TESS_COMBINE_DATA callback ...

Страница 416: ...lls to gluTessBeginContour gluTessEndContour Within each contour there are zero or more calls to gluTessVertex The vertices specify a closed contour the last vertex of each contour is automatically linked to the first See the gluTessVertex gluTessBeginContour and gluTessEndContour reference pages for more details Once gluTessEndPolygon is called the polygon is tessellated and the resulting triangl...

Страница 417: ...e normal CW orientation can be obtained by reversing the sign of the supplied normal For example if you know that all polygons lie in the XY plane call gluTessNormal tess 0 0 0 0 1 0 before rendering any polygons If the supplied normal is 0 0 0 0 0 0 the initial value the normal is determined as follows The direction of the normal up to its sign is found by fitting a plane to the vertices without ...

Страница 418: ...ITIVE or GLU_TESS_WINDING_NEGATIVE or GLU_TESS_WINDING_ABS_GEQ_TWO To understand how the winding rule works consider that the input contours partition the plane into regions The winding rule determines which of these regions are inside the polygon For a single contour C the winding number of a point x is simply the signed number of revolutions we make around x as we travel once around C where CCW ...

Страница 419: ... tolerance is multiplied by the largest coordinate magnitude of any input vertex this specifies the maximum distance that any feature can move as the result of a single merge operation If a single feature takes part in several merge operations the total distance moved could be larger Feature merging is completely optional the tolerance is only a hint The implementation is free to merge in some cas...

Страница 420: ...ertex can only be called between gluTessBeginContour and gluTessEndContour data normally points to a structure containing the vertex location as well as other per vertex attributes such as color and normal This pointer is passed back to the user through the GLU_TESS_VERTEX or GLU_TESS_VERTEX_DATA callback after tessellation see the gluTessCallback reference page Notes It is a common error to use a...

Страница 421: ...onsists of a single point when a local variable is used for data and a GLU_TESS_NEED_COMBINE_CALLBACK error when a local variable is used for location See Also gluTessBeginPolygon gluNewTess gluTessBeginContour gluTessCallback gluTessProperty gluTessNormal gluTessEndPolygon ...

Страница 422: ...ord3iv glTexCoord3sv glTexCoord4dv glTexCoord4fv glTexCoord4iv glTexCoord4sv set the current texture coordinates C Specification void glTexCoord1d GLdouble s void glTexCoord1f GLfloat s void glTexCoord1i GLint s void glTexCoord1s GLshort s void glTexCoord2d GLdouble s GLdouble t void glTexCoord2f GLfloat s GLfloat t void glTexCoord2i GLint s GLint t void glTexCoord2s GLshort s GLshort t void glTex...

Страница 423: ...st GLfloat v void glTexCoord1iv const GLint v void glTexCoord1sv const GLshort v void glTexCoord2dv const GLdouble v void glTexCoord2fv const GLfloat v void glTexCoord2iv const GLint v void glTexCoord2sv const GLshort v void glTexCoord3dv const GLdouble v void glTexCoord3fv const GLfloat v void glTexCoord3iv const GLint v void glTexCoord3sv const GLshort v void glTexCoord4dv const GLdouble v void ...

Страница 424: ...0 1 a call to glTexCoord2 sets them to s t 0 1 Similarly glTexCoord3 specifies the texture coordinates as s t r 1 and glTexCoord4 defines all four components explicitly as s t r q The current texture coordinates are part of the data that is associated with each vertex and with the current raster position Initially the values for s t r and q are 0 0 0 1 Notes The current texture coordinates can be ...

Страница 425: ...e specifies the number of coordinates per element and must be 1 2 3 or 4 type specifies the data type of each texture coordinate and stride specifies the byte stride from one array element to the next allowing vertexes and attributes to be packed into a single array or stored in separate arrays Single array storage may be more efficient on some implementations see glInterleavedArrays When a textur...

Страница 426: ...e array parameters are client side state and are therefore not saved or restored by glPushAttrib and glPopAttrib Use glPushClientAttrib and glPopClientAttrib instead Errors GL_INVALID_VALUE is generated if size is not 1 2 3 or 4 GL_INVALID_ENUM is generated if type is not an accepted value GL_INVALID_VALUE is generated if stride is negative Associated Gets glIsEnabled with argument GL_TEXTURE_COOR...

Страница 427: ...glTexEnvi Specifies the symbolic name of a single valued texture environment parameter Must be GL_TEXTURE_ENV_MODE pname for glTexEnvfv and glTexEnviv Specifies the symbolic name of a texture environment parameter Accepted values are GL_TEXTURE_ENV_MODE and GL_TEXTURE_ENV_COLOR and GL_TEXTURE_LIGHTING_MODE_hp param Specifies a single symbolic constant one of GL_MODULATE GL_DECAL GL_BLEND or GL_REP...

Страница 428: ...ure functions that can be chosen C is a triple of color values RGB and A is the associated alpha value RGBA values extracted from a texture image are in the range 0 1 The subscript f refers to the incoming fragment the subscript t to the texture image the subscript c to the texture environment color and subscript v indicates a value produced by the texture function A texture image can have up to f...

Страница 429: ...y only be used if the GL_hp_texture_lighting extension is supported Internal formats other than 1 2 3 or 4 may only be used if the GL version is 1 1 or greater Errors GL_INVALID_ENUM is generated when target or pname is not one of the accepted defined values or when params should have a defined constant value based on the value of pname and does not GL_INVALID_OPERATION is generated if glTexEnv is...

Страница 430: ...T glTexEnv Chapter 18 430 glCopyTexSubImage2D glTexImage1D glTexImage2D glTexParameter glTexSubImage1D glTexSubImage2D ...

Страница 431: ... const GLfloat params void glTexGeniv GLenum coord GLenum pname const GLint params Parameters coord Specifies a texture coordinate Must be one of GL_S GL_T GL_R or GL_Q pname Specifies the symbolic name of the texture coordinate generation function Must be GL_TEXTURE_GEN_MODE param Specifies a single valued texture generation parameter one of GL_OBJECT_LINEAR GL_EYE_LINEAR or GL_SPHERE_MAP coord S...

Страница 432: ... for example to texture map terrain using sea level as a reference plane defined by p1 p2 p3 and p4 The altitude of a terrain vertex is computed by the GL_OBJECT_LINEAR coordinate generation function as its distance from sea level that altitude can then be used to index the texture image to map white snow onto peaks and green grass onto foothills If the texture generation function is GL_EYE_LINEAR...

Страница 433: ...bled Both s plane equations are 1 0 0 0 both t plane equations are 0 1 0 0 and all r and q plane equations are 0 0 0 0 Errors GL_INVALID_ENUM is generated when coord or pname is not an accepted defined value or when pname is GL_TEXTURE_GEN_MODE and params is not an accepted defined value GL_INVALID_ENUM is generated when pname is GL_TEXTURE_GEN_MODE params is GL_SPHERE_MAP and coord is either GL_R...

Страница 434: ...GL_LUMINANCE6_ALPHA2 GL_LUMINANCE8_ALPHA8 GL_LUMINANCE12_ALPHA4 GL_LUMINANCE12_ALPHA12 GL_LUMINANCE16_ALPHA16 GL_INTENSITY GL_INTENSITY4 GL_INTENSITY8 GL_INTENSITY12 GL_INTENSITY16 GL_RGB GL_R3_G3_B2 GL_RGB4 GL_RGB5 GL_RGB8 GL_RGB10 GL_RGB12 GL_RGB16 GL_RGBA GL_RGBA2 GL_RGBA4 GL_RGB5_A1 GL_RGBA8 GL_RGB10_A2 GL_RGBA12 or GL_RGBA16 Additionally if the extension GL_EXT_shadow is supported may be one ...

Страница 435: ...l of the image state to 0 but does not generate an error see glGetError To query for an entire mipmap array use an image array level greater than or equal to 1 If target is GL_TEXTURE_1D data is read from pixels as a sequence of signed or unsigned bytes shorts or longs or single precision floating point values depending on type These values are grouped into sets of one two three or four values dep...

Страница 436: ...0 1 see glPixelTransfer GL_RGB Each element is an RGB triple The GL converts it to floating point and assembles it into an RGBA element by attaching 1 for alpha Each component is then multiplied by the signed scale factor GL_c_SCALE added to the signed bias GL_c_BIAS and clamped to the range 0 1 see glPixelTransfer GL_RGBA Each element contains all four components Each component is then multiplied...

Страница 437: ...ta formats as the pixels in a glDrawPixels command except that GL_STENCIL_INDEX and GL_DEPTH_COMPONENT cannot be used glPixelStore and glPixelTransfer modes affect texture images in exactly the way they affect glDrawPixels The format value GL_DEPTH_COMPONENT and internalformat values GL_DEPTH_COMPONENT16_EXT GL_DEPTH_COMPONENT24_EXT and GL_DEPTH_COMPONENT32_EXT may only be used if the GL_EXT_shado...

Страница 438: ...EXTURE_SIZE or if it cannot be represented as 2n 2 border for some integer value of n GL_INVALID_VALUE is generated if border is not 0 or 1 GL_INVALID_OPERATION is generated if glTexImage1D is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glGetTexImage glIsEnabled with argument GL_TEXTURE_1D See Also glCopyPixels glCopyTexImage1D glCopyTexImage2...

Страница 439: ...E_ALPHA GL_LUMINANCE4_ALPHA4 GL_LUMINANCE6_ALPHA2 GL_LUMINANCE8_ALPHA8 GL_LUMINANCE12_ALPHA4 GL_LUMINANCE12_ALPHA12 GL_LUMINANCE16_ALPHA16 GL_INTENSITY GL_INTENSITY4 GL_INTENSITY8 GL_INTENSITY12 GL_INTENSITY16 GL_R3_G3_B2 GL_RGB GL_RGB4 GL_RGB5 GL_RGB8 GL_RGB10 GL_RGB12 GL_RGB16 GL_RGBA GL_RGBA2 GL_RGBA4 GL_RGB5_A1 GL_RGBA8 GL_RGB10_A2 GL_RGBA12 or GL_RGBA16 Additionally if the extension GL_EXT_sh...

Страница 440: ...tion s capabilities If the implementation cannot handle a texture of the requested texture size it sets all of the image state to 0 but does not generate an error see glGetError To query for an entire mipmap array use an image array level greater than or equal to 1 If target is GL_TEXTURE_2D data is read from pixels as a sequence of signed or unsigned bytes shorts or longs or single precision floa...

Страница 441: ...bles it into an RGBA element by attaching 0 for red green and blue Each component is then multiplied by the signed scale factor GL_c_SCALE added to the signed bias GL_c_BIAS and clamped to the range 0 1 see glPixelTransfer GL_RGB Each element is an RGB triple The GL converts it to floating point and assembles it into an RGBA element by attaching 1 for alpha Each component is then multiplied by the...

Страница 442: ...d from pixels A two component image uses the R and A values A three component image uses the R G and B values A four component image uses all of the RGBA components Notes Texturing has no effect in color index mode The texture image can be represented by the same data formats as the pixels in a glDrawPixels command except that GL_STENCIL_INDEX and GL_DEPTH_COMPONENT cannot be used glPixelStore and...

Страница 443: ... constants GL_INVALID_VALUE is generated if width or height is less than 0 or greater than 2 GL_MAX_TEXTURE_SIZE or if either cannot be represented as 2k 2 border for some integer value of k GL_INVALID_VALUE is generated if border is not 0 or 1 GL_INVALID_OPERATION is generated if glTexImage2D is executed between the execution of glBegin and the corresponding execution of glEnd Associated Gets glG...

Страница 444: ...PHA4 GL_ALPHA8 GL_ALPHA12 GL_ALPHA16 GL_LUMINANCE GL_LUMINANCE4 GL_LUMINANCE8 GL_LUMINANCE12 GL_LUMINANCE16 GL_LUMINANCE_ALPHA GL_LUMINANCE4_ALPHA4 GL_LUMINANCE6_ALPHA2 GL_LUMINANCE8_ALPHA8 GL_LUMINANCE12_ALPHA4 GL_LUMINANCE12_ALPHA12 GL_LUMINANCE16_ALPHA16 GL_INTENSITY GL_INTENSITY4 GL_INTENSITY8 GL_INTENSITY12 GL_INTENSITY16 GL_R3_G3_B2 GL_RGB GL_RGB4 GL_RGB5 GL_RGB8 GL_RGB10 GL_RGB12 GL_RGB16 G...

Страница 445: ...d for glDrawPixels If target is GL_PROXY_TEXTURE_3D_EXT no data is read from pixels but all of the texture image state is recalculated checked for consistency and checked against the implementation s capabilities If the implementation cannot handle a texture of the requested texture size it will set all of the texture image state to 0 GL_TEXTURE_WIDTH GL_TEXTURE_HEIGHT GL_TEXTURE_BORDER GL_TEXTURE...

Страница 446: ...then blue and then alpha for GL_ABGR_EXT the order is alpha blue green and then red GL_LUMINANCE Each element is a single luminance value It is converted to floating point then assembled into an RGBA element by replicating the luminance value three times for red green and blue and attaching 1 0 for alpha GL_LUMINANCE_ALPHA Each element is a luminance alpha pair It is converted to floating point th...

Страница 447: ...extension Errors GL_INVALID_ENUM is generated when target is not an accepted value GL_INVALID_ENUM is generated when format is not an accepted value GL_INVALID_ENUM is generated when type is not an accepted value GL_INVALID_VALUE is generated if level is less than zero or greater than log2max where max is the returned value of GL_MAX_3D_TEXTURE_SIZE_EXT GL_INVALID_VALUE is generated if internalfor...

Страница 448: ...T glTexImage3DEXT Chapter 18 448 glTexGen glTexImage1D glTexImage2D glTexParameter ...

Страница 449: ...or GL_TEXTURE_3D_EXT pname Specifies the symbolic name of a single valued texture parameter pname can be one of the following GL_TEXTURE_MIN_FILTER GL_TEXTURE_MAG_FILTER GL_TEXTURE_WRAP_S GL_TEXTURE_WRAP_T GL_TEXTURE_PRIORITY GL_TEXTURE_COMPARE_EXT or GL_TEXTURE_COMPARE_OPERATOR_EXT param Specifies the value of pname target Specifies the target texture which must be either GL_TEXTURE_1D or GL_TEXT...

Страница 450: ...ensions 2k 1 2l 1 where 2k 2l are the dimensions of the previous mipmap until either k 0 or l 0 At that point subsequent mipmaps have dimension 1 2l 1 or 2k 1 1 until the final mipmap which has dimension 1 1 To define the mipmaps call glTexImage1D glTexImage2D glCopyTexImage1D glCopyTexImage2D or glCopyTexImage3DEXT with the level argument indicating the order of the mipmaps Level 0 is the origina...

Страница 451: ...AR see below GL_NEAREST is generally faster than GL_LINEAR but it can produce textured images with sharper edges because the transition between texture elements is not as smooth The initial value of GL_TEXTURE_MAG_FILTER is GL_LINEAR GL_NEAREST Returns the value of the texture element that is nearest in Manhattan distance to the center of the pixel being textured GL_LINEAR Returns the weighted ave...

Страница 452: ...lCopyTexSubImage2D or glCopyTexSubImage3DEXT The default is GL_FALSE no automatic generation of MIP levels GL_TEXTURE_COMPARE_EXT Specifies whether the depth texture comparison operator is in effect param is either GL_TRUE or GL_FALSE The default is GL_FALSE meaning that the depth texture comparison operator is not in effect see GL_TEXTURE_COMPARE_OPERATOR_EXT below GL_TEXTURE_COMPARE_OPERATOR_EXT...

Страница 453: ...WRAP_T and GL_WRAP_R_EXT is only supported if the extension GL_EXT_texture_border_clamp is supported The GL_CLAMP_TO_EDGE_EXT param to GL_WRAP_S GL_WRAP_T and GL_WRAP_R_EXT is only supported if the extension GL_EXT_texture_edge_clamp is supported GL_TEXTURE_WRAP_R_EXT and the target GL_TEXTURE_3D_EXT are only supported if the extension GL_EXT_texture3D is supported GL_GENERATE_MIPMAP_EXTis only su...

Страница 454: ...T glTexParameter Chapter 18 454 glDrawPixels glPixelStore glPixelTransfer glPrioritizeTextures glTexEnv glTexGen glTexImage1D glTexImage2D glTexSubImage1D glTexSubImage2D ...

Страница 455: ...is supported then the symbolic value GL_DEPTH_COMPONENT is also accepted type Specifies the data type of the pixel data The following symbolic values are accepted GL_UNSIGNED_BYTE GL_BYTE GL_BITMAP GL_UNSIGNED_SHORT GL_SHORT GL_UNSIGNED_INT GL_INT and GL_FLOAT pixels Specifies a pointer to the image data in memory Description Texturing maps a portion of a specified texture image onto each graphica...

Страница 456: ...d value of GL_MAX_TEXTURE_SIZE GL_INVALID_VALUE is generated if xoffset b or if xoffset width w b where w is the GL_TEXTURE_WIDTH and b is the width of the GL_TEXTURE_BORDER of the texture image being modified Note that w includes twice the border width GL_INVALID_VALUE is generated if width is less than 0 GL_INVALID_ENUM is generated if format is not an accepted format constant GL_INVALID_ENUM is...

Страница 457: ...T glTexSubImage1D Chapter 18 457 glTexImage2D glTexParameter glTexSubImage2D ...

Страница 458: ...following symbolic values are accepted GL_COLOR_INDEX GL_RED GL_GREEN GL_BLUE GL_ALPHA GL_RGB GL_RGBA GL_LUMINANCE and GL_LUMINANCE_ALPHA If the extension GL_EXT_shadow is supported then the symbolic value GL_DEPTH_COMPONENT is also accepted type Specifies the data type of the pixel data The following symbolic values are accepted GL_UNSIGNED_BYTE GL_BYTE GL_BITMAP GL_UNSIGNED_SHORT GL_SHORT GL_UNS...

Страница 459: ...ated if level is less than 0 GL_INVALID_VALUE may be generated if level is greater than log2 max where max is the returned value of GL_MAX_TEXTURE_SIZE GL_INVALID_VALUE is generated if xoffset b xoffset width w b yoffset b or yoffset height h b where w is the GL_TEXTURE_WIDTH h is the GL_TEXTURE_HEIGHT and b is the border width of the texture image being modified Note that w and h include twice th...

Страница 460: ...T glTexSubImage2D Chapter 18 460 glPixelStore glPixelTransfer glTexEnv glTexGen glTexImage1D glTexImage2D glTexSubImage1D glTexParameter ...

Страница 461: ...offset in the Y direction within the texture array zoffset Specifies a texel offset in the Z direction within the texture array width Specifies the width of the texture sub image height Specifies the height of the texture sub image depth Specifies the depth of the texture sub image format Specifies the format of the pixel data The following symbolic values are accepted GL_COLOR_INDEX GL_RED GL_GRE...

Страница 462: ...els Errors GL_INVALID_ENUM is generated when target is not GL_TEXTURE_3D_EXT GL_INVALID_OPERATION is generated when the texture array has not been defined by a previous glTexImage3D operation GL_INVALID_VALUE is generated if level is less than zero or greater than log2max where max is the returned value of GL_MAX_3D_TEXTURE_SIZE_EXT GL_INVALID_VALUE is generated if xoffset TEXTURE_BORDER xoffset w...

Страница 463: ...T glTexSubImage3DEXT Chapter 18 463 See Also glDrawPixels glFog glPixelStore glPixelTransfer glTexEnv glTexGen glTexImage3D glTexParameter ...

Страница 464: ...ct replacing the current matrix as if glMultMatrix were called with the following matrix for its argument 1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1 If the matrix mode is either GL_MODELVIEW or GL_PROJECTION all objects drawn after a call to glTranslate are translated Use glPushMatrix and glPopMatrix to save and restore the un translated coordinate system Errors GL_INVALID_OPERATION is generated if glTransla...

Страница 465: ...T glTranslate Chapter 18 465 See Also glMatrixMode glMultMatrix glPushMatrix glScale ...

Страница 466: ...T glTranslate Chapter 18 466 ...

Страница 467: ...Chapter 19 467 19 U ...

Страница 468: ...call view Specifies the viewport as from a glGetIntegerv call objX objY objZ Returns the computed object coordinates Description gluUnProject maps the specified window coordinates into object coordinates using model proj and view The result is stored in objX objY and objZ A return value of GL_TRUE indicates success a return value of GL_FALSE indicates failure To compute the coordinates objX objY o...

Страница 469: ...U gluUnProject Chapter 19 469 See Also glGet gluProject ...

Страница 470: ...rbearing lbearing and ascent descent respectively xmove is taken from the glyph s width metric and ymove is set to zero Finally the glyph s image is converted to the appropriate format for glBitmap Using glXUseXFont may be more efficient than accessing the X font and generating the display lists explicitly both because the display lists are created on the server without requiring a round trip of t...

Страница 471: ...U glXUseXFont Chapter 19 471 See Also glBitmap glXMakeCurrent ...

Страница 472: ...U glXUseXFont Chapter 19 472 ...

Страница 473: ...Chapter 20 473 20 V ...

Страница 474: ...x4sv specify a vertex C Specification void glVertex2d GLdouble x GLdouble y void glVertex2f GLfloat x GLfloat y void glVertex2i GLint x GLint y void glVertex2s GLshort x GLshort y void glVertex3d GLdouble x GLdouble y GLdouble z void glVertex3f GLfloat x GLfloat y GLfloat z void glVertex3i GLint x GLint y GLint z void glVertex3s GLshort x GLshort y GLshort z void glVertex4d GLdouble x GLdouble y G...

Страница 475: ... z w Specify x y z and w coordinates of a vertex Not all parameters are present in all forms of the command v Specifies a pointer to an array of two three or four elements The elements of a two element array are x and y of a three element array x y and z and of a four element array x y z and w Description glVertex commands are used within glBegin glEnd pairs to specify point line and polygon verti...

Страница 476: ...V glVertex Chapter 20 476 See Also glBegin glCallList glColor glEdgeFlag glEvalCoord glIndex glMaterial glNormal glRect glTexCoord glVertexPointer ...

Страница 477: ...ta type of the coordinates stride specifies the byte stride from one vertex to the next allowing vertexes and attributes to be packed into a single array or stored in separate arrays Single array storage may be more efficient on some implementations see glInterleavedArrays When a vertex array is specified size type stride and pointer are saved as client side state To enable and disable the vertex ...

Страница 478: ... glPopClientAttrib instead Errors GL_INVALID_VALUE is generated if size is not 2 3 or 4 GL_INVALID_ENUM is generated if type is not an accepted value GL_INVALID_VALUE is generated if stride is negative Associated Gets glIsEnabled with argument GL_VERTEX_ARRAY glGet with argument GL_VERTEX_ARRAY_SIZE glGet with argument GL_VERTEX_ARRAY_TYPE glGet with argument GL_VERTEX_ARRAY_STRIDE glGetPointerv w...

Страница 479: ...nd y from normalized device coordinates to window coordinates Let xnd ynd be normalized device coordinates Then the window coordinates xw yw are computed as follows xw xnd 1 width 2 x yw ynd 1 height 2 y Viewport width and height are silently clamped to a range that depends on the implementation To query this range call glGet with argumentGL_MAX_VIEWPORT_DIMS Errors GL_INVALID_VALUE is generated i...

Страница 480: ... primitive s rendered during that test were visible A value of GL_FALSE indicates that no portion of the primitive s rendered during the test was visible The third parameter wait_on_get is intended to allow for potential optimizations during Visibility Tests When Visibility Tests are made there is often some amount of latency between the time the request is made and when the answer is available On...

Страница 481: ...led See Description section above for more information on when the contents of buffer become valid The programmer is responsible for allocating the memory for buffer If an incorrect size is specified memory corruption may occur Errors GL_INVALID_VALUE is generated if size is negative GL_INVALID_OPERATION is generated if glVisibilityBufferhp is called while GL_VISIBILITY_TEST_hp is enabled via glEn...

Страница 482: ...V glVisibilityBufferhp Chapter 20 482 ...

Страница 483: ...Chapter 21 483 21 W ...

Страница 484: ...lt can be achieved using glFinish glXWaitGL does not require a round trip to the server and it is therefore more efficient in cases where client and server are on separate machines glXWaitGL is ignored if there is no current GLX context Notes glXWaitGL may or may not flush the X stream Errors GLXBadCurrentWindow is generated if the drawable associated with the current context of the calling thread...

Страница 485: ...t can be achieved using XSync glXWaitX does not require a round trip to the server and it is therefore more efficient in cases where client and server are on separate machines glXWaitX is ignored if there is no current GLX context Note glXWaitX may or may not flush the GL stream Errors GLXBadCurrentWindow is generated if the drawable associated with the current context of the calling thread is a w...

Страница 486: ...W glXWaitX Chapter 21 486 ...

Отзывы: