3 * Device driver interfaces.
7 * Mesa 3-D graphics library
10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
36 struct gl_pixelstore_attrib
;
37 struct mesa_display_list
;
39 #if FEATURE_ARB_vertex_buffer_object
40 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
41 * NULL) if buffer is unavailable for immediate mapping.
43 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
44 * would require more book-keeping in the driver than seems necessary
47 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
48 * want to provoke the driver to throw away the old storage, we will
49 * respect the contents of already referenced data.
51 #define MESA_MAP_NOWAIT_BIT 0x0040
56 * Device driver function table.
57 * Core Mesa uses these function pointers to call into device drivers.
58 * Most of these functions directly correspond to OpenGL state commands.
59 * Core Mesa will call these functions after error checking has been done
60 * so that the drivers don't have to worry about error testing.
62 * Vertex transformation/clipping/lighting is patched into the T&L module.
63 * Rasterization functions are patched into the swrast module.
65 * Note: when new functions are added here, the drivers/common/driverfuncs.c
66 * file should be updated too!!!
68 struct dd_function_table
{
70 * Return a string as needed by glGetString().
71 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
74 const GLubyte
* (*GetString
)( GLcontext
*ctx
, GLenum name
);
77 * Notify the driver after Mesa has made some internal state changes.
79 * This is in addition to any state change callbacks Mesa may already have
82 void (*UpdateState
)( GLcontext
*ctx
, GLbitfield new_state
);
85 * Get the width and height of the named buffer/window.
87 * Mesa uses this to determine when the driver's window size has changed.
88 * XXX OBSOLETE: this function will be removed in the future.
90 void (*GetBufferSize
)( GLframebuffer
*buffer
,
91 GLuint
*width
, GLuint
*height
);
94 * Resize the given framebuffer to the given size.
95 * XXX OBSOLETE: this function will be removed in the future.
97 void (*ResizeBuffers
)( GLcontext
*ctx
, GLframebuffer
*fb
,
98 GLuint width
, GLuint height
);
101 * Called whenever an error is generated.
102 * __GLcontextRec::ErrorValue contains the error value.
104 void (*Error
)( GLcontext
*ctx
);
107 * This is called whenever glFinish() is called.
109 void (*Finish
)( GLcontext
*ctx
);
112 * This is called whenever glFlush() is called.
114 void (*Flush
)( GLcontext
*ctx
);
117 * Clear the color/depth/stencil/accum buffer(s).
118 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
119 * renderbuffers need to be cleared.
121 void (*Clear
)( GLcontext
*ctx
, GLbitfield buffers
);
124 * Execute glAccum command.
126 void (*Accum
)( GLcontext
*ctx
, GLenum op
, GLfloat value
);
130 * Execute glRasterPos, updating the ctx->Current.Raster fields
132 void (*RasterPos
)( GLcontext
*ctx
, const GLfloat v
[4] );
135 * \name Image-related functions
140 * Called by glDrawPixels().
141 * \p unpack describes how to unpack the source image data.
143 void (*DrawPixels
)( GLcontext
*ctx
,
144 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
145 GLenum format
, GLenum type
,
146 const struct gl_pixelstore_attrib
*unpack
,
147 const GLvoid
*pixels
);
150 * Called by glReadPixels().
152 void (*ReadPixels
)( GLcontext
*ctx
,
153 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
154 GLenum format
, GLenum type
,
155 const struct gl_pixelstore_attrib
*unpack
,
159 * Called by glCopyPixels().
161 void (*CopyPixels
)( GLcontext
*ctx
, GLint srcx
, GLint srcy
,
162 GLsizei width
, GLsizei height
,
163 GLint dstx
, GLint dsty
, GLenum type
);
166 * Called by glBitmap().
168 void (*Bitmap
)( GLcontext
*ctx
,
169 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
170 const struct gl_pixelstore_attrib
*unpack
,
171 const GLubyte
*bitmap
);
176 * \name Texture image functions
181 * Choose texture format.
183 * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
184 * functions. The driver should examine \p internalFormat and return a
185 * pointer to an appropriate gl_texture_format.
187 const struct gl_texture_format
*(*ChooseTextureFormat
)( GLcontext
*ctx
,
188 GLint internalFormat
, GLenum srcFormat
, GLenum srcType
);
191 * Called by glTexImage1D().
193 * \param target user specified.
194 * \param format user specified.
195 * \param type user specified.
196 * \param pixels user specified.
197 * \param packing indicates the image packing of pixels.
198 * \param texObj is the target texture object.
199 * \param texImage is the target texture image. It will have the texture \p
200 * width, \p height, \p depth, \p border and \p internalFormat information.
202 * \p retainInternalCopy is returned by this function and indicates whether
203 * core Mesa should keep an internal copy of the texture image.
205 * Drivers should call a fallback routine from texstore.c if needed.
207 void (*TexImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
208 GLint internalFormat
,
209 GLint width
, GLint border
,
210 GLenum format
, GLenum type
, const GLvoid
*pixels
,
211 const struct gl_pixelstore_attrib
*packing
,
212 struct gl_texture_object
*texObj
,
213 struct gl_texture_image
*texImage
);
216 * Called by glTexImage2D().
218 * \sa dd_function_table::TexImage1D.
220 void (*TexImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
221 GLint internalFormat
,
222 GLint width
, GLint height
, GLint border
,
223 GLenum format
, GLenum type
, const GLvoid
*pixels
,
224 const struct gl_pixelstore_attrib
*packing
,
225 struct gl_texture_object
*texObj
,
226 struct gl_texture_image
*texImage
);
229 * Called by glTexImage3D().
231 * \sa dd_function_table::TexImage1D.
233 void (*TexImage3D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
234 GLint internalFormat
,
235 GLint width
, GLint height
, GLint depth
, GLint border
,
236 GLenum format
, GLenum type
, const GLvoid
*pixels
,
237 const struct gl_pixelstore_attrib
*packing
,
238 struct gl_texture_object
*texObj
,
239 struct gl_texture_image
*texImage
);
242 * Called by glTexSubImage1D().
244 * \param target user specified.
245 * \param level user specified.
246 * \param xoffset user specified.
247 * \param yoffset user specified.
248 * \param zoffset user specified.
249 * \param width user specified.
250 * \param height user specified.
251 * \param depth user specified.
252 * \param format user specified.
253 * \param type user specified.
254 * \param pixels user specified.
255 * \param packing indicates the image packing of pixels.
256 * \param texObj is the target texture object.
257 * \param texImage is the target texture image. It will have the texture \p
258 * width, \p height, \p border and \p internalFormat information.
260 * The driver should use a fallback routine from texstore.c if needed.
262 void (*TexSubImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
263 GLint xoffset
, GLsizei width
,
264 GLenum format
, GLenum type
,
265 const GLvoid
*pixels
,
266 const struct gl_pixelstore_attrib
*packing
,
267 struct gl_texture_object
*texObj
,
268 struct gl_texture_image
*texImage
);
271 * Called by glTexSubImage2D().
273 * \sa dd_function_table::TexSubImage1D.
275 void (*TexSubImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
276 GLint xoffset
, GLint yoffset
,
277 GLsizei width
, GLsizei height
,
278 GLenum format
, GLenum type
,
279 const GLvoid
*pixels
,
280 const struct gl_pixelstore_attrib
*packing
,
281 struct gl_texture_object
*texObj
,
282 struct gl_texture_image
*texImage
);
285 * Called by glTexSubImage3D().
287 * \sa dd_function_table::TexSubImage1D.
289 void (*TexSubImage3D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
290 GLint xoffset
, GLint yoffset
, GLint zoffset
,
291 GLsizei width
, GLsizei height
, GLint depth
,
292 GLenum format
, GLenum type
,
293 const GLvoid
*pixels
,
294 const struct gl_pixelstore_attrib
*packing
,
295 struct gl_texture_object
*texObj
,
296 struct gl_texture_image
*texImage
);
299 * Called by glGetTexImage().
301 void (*GetTexImage
)( GLcontext
*ctx
, GLenum target
, GLint level
,
302 GLenum format
, GLenum type
, GLvoid
*pixels
,
303 struct gl_texture_object
*texObj
,
304 struct gl_texture_image
*texImage
);
307 * Called by glCopyTexImage1D().
309 * Drivers should use a fallback routine from texstore.c if needed.
311 void (*CopyTexImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
312 GLenum internalFormat
, GLint x
, GLint y
,
313 GLsizei width
, GLint border
);
316 * Called by glCopyTexImage2D().
318 * Drivers should use a fallback routine from texstore.c if needed.
320 void (*CopyTexImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
321 GLenum internalFormat
, GLint x
, GLint y
,
322 GLsizei width
, GLsizei height
, GLint border
);
325 * Called by glCopyTexSubImage1D().
327 * Drivers should use a fallback routine from texstore.c if needed.
329 void (*CopyTexSubImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
331 GLint x
, GLint y
, GLsizei width
);
333 * Called by glCopyTexSubImage2D().
335 * Drivers should use a fallback routine from texstore.c if needed.
337 void (*CopyTexSubImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
338 GLint xoffset
, GLint yoffset
,
340 GLsizei width
, GLsizei height
);
342 * Called by glCopyTexSubImage3D().
344 * Drivers should use a fallback routine from texstore.c if needed.
346 void (*CopyTexSubImage3D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
347 GLint xoffset
, GLint yoffset
, GLint zoffset
,
349 GLsizei width
, GLsizei height
);
352 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
354 void (*GenerateMipmap
)(GLcontext
*ctx
, GLenum target
,
355 struct gl_texture_object
*texObj
);
358 * Called by glTexImage[123]D when user specifies a proxy texture
361 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
363 GLboolean (*TestProxyTexImage
)(GLcontext
*ctx
, GLenum target
,
364 GLint level
, GLint internalFormat
,
365 GLenum format
, GLenum type
,
366 GLint width
, GLint height
,
367 GLint depth
, GLint border
);
372 * \name Compressed texture functions
377 * Called by glCompressedTexImage1D().
379 * \param target user specified.
380 * \param format user specified.
381 * \param type user specified.
382 * \param pixels user specified.
383 * \param packing indicates the image packing of pixels.
384 * \param texObj is the target texture object.
385 * \param texImage is the target texture image. It will have the texture \p
386 * width, \p height, \p depth, \p border and \p internalFormat information.
388 * \a retainInternalCopy is returned by this function and indicates whether
389 * core Mesa should keep an internal copy of the texture image.
391 void (*CompressedTexImage1D
)( GLcontext
*ctx
, GLenum target
,
392 GLint level
, GLint internalFormat
,
393 GLsizei width
, GLint border
,
394 GLsizei imageSize
, const GLvoid
*data
,
395 struct gl_texture_object
*texObj
,
396 struct gl_texture_image
*texImage
);
398 * Called by glCompressedTexImage2D().
400 * \sa dd_function_table::CompressedTexImage1D.
402 void (*CompressedTexImage2D
)( GLcontext
*ctx
, GLenum target
,
403 GLint level
, GLint internalFormat
,
404 GLsizei width
, GLsizei height
, GLint border
,
405 GLsizei imageSize
, const GLvoid
*data
,
406 struct gl_texture_object
*texObj
,
407 struct gl_texture_image
*texImage
);
409 * Called by glCompressedTexImage3D().
411 * \sa dd_function_table::CompressedTexImage3D.
413 void (*CompressedTexImage3D
)( GLcontext
*ctx
, GLenum target
,
414 GLint level
, GLint internalFormat
,
415 GLsizei width
, GLsizei height
, GLsizei depth
,
417 GLsizei imageSize
, const GLvoid
*data
,
418 struct gl_texture_object
*texObj
,
419 struct gl_texture_image
*texImage
);
422 * Called by glCompressedTexSubImage1D().
424 * \param target user specified.
425 * \param level user specified.
426 * \param xoffset user specified.
427 * \param yoffset user specified.
428 * \param zoffset user specified.
429 * \param width user specified.
430 * \param height user specified.
431 * \param depth user specified.
432 * \param imageSize user specified.
433 * \param data user specified.
434 * \param texObj is the target texture object.
435 * \param texImage is the target texture image. It will have the texture \p
436 * width, \p height, \p depth, \p border and \p internalFormat information.
438 void (*CompressedTexSubImage1D
)(GLcontext
*ctx
, GLenum target
, GLint level
,
439 GLint xoffset
, GLsizei width
,
441 GLsizei imageSize
, const GLvoid
*data
,
442 struct gl_texture_object
*texObj
,
443 struct gl_texture_image
*texImage
);
445 * Called by glCompressedTexSubImage2D().
447 * \sa dd_function_table::CompressedTexImage3D.
449 void (*CompressedTexSubImage2D
)(GLcontext
*ctx
, GLenum target
, GLint level
,
450 GLint xoffset
, GLint yoffset
,
451 GLsizei width
, GLint height
,
453 GLsizei imageSize
, const GLvoid
*data
,
454 struct gl_texture_object
*texObj
,
455 struct gl_texture_image
*texImage
);
457 * Called by glCompressedTexSubImage3D().
459 * \sa dd_function_table::CompressedTexImage3D.
461 void (*CompressedTexSubImage3D
)(GLcontext
*ctx
, GLenum target
, GLint level
,
462 GLint xoffset
, GLint yoffset
, GLint zoffset
,
463 GLsizei width
, GLint height
, GLint depth
,
465 GLsizei imageSize
, const GLvoid
*data
,
466 struct gl_texture_object
*texObj
,
467 struct gl_texture_image
*texImage
);
471 * Called by glGetCompressedTexImage.
473 void (*GetCompressedTexImage
)(GLcontext
*ctx
, GLenum target
, GLint level
,
475 const struct gl_texture_object
*texObj
,
476 const struct gl_texture_image
*texImage
);
479 * Called to query number of bytes of storage needed to store the
480 * specified compressed texture.
482 GLuint (*CompressedTextureSize
)( GLcontext
*ctx
, GLsizei width
,
483 GLsizei height
, GLsizei depth
,
488 * \name Texture object functions
493 * Called by glBindTexture().
495 void (*BindTexture
)( GLcontext
*ctx
, GLenum target
,
496 struct gl_texture_object
*tObj
);
499 * Called to allocate a new texture object.
500 * A new gl_texture_object should be returned. The driver should
501 * attach to it any device-specific info it needs.
503 struct gl_texture_object
* (*NewTextureObject
)( GLcontext
*ctx
, GLuint name
,
506 * Called when a texture object is about to be deallocated.
508 * Driver should delete the gl_texture_object object and anything
511 void (*DeleteTexture
)( GLcontext
*ctx
, struct gl_texture_object
*tObj
);
514 * Called to allocate a new texture image object.
516 struct gl_texture_image
* (*NewTextureImage
)( GLcontext
*ctx
);
519 * Called to free tImage->Data.
521 void (*FreeTexImageData
)( GLcontext
*ctx
, struct gl_texture_image
*tImage
);
524 * Note: no context argument. This function doesn't initially look
525 * like it belongs here, except that the driver is the only entity
526 * that knows for sure how the texture memory is allocated - via
527 * the above callbacks. There is then an argument that the driver
528 * knows what memcpy paths might be fast. Typically this is invoked with
530 * to -- a pointer into texture memory allocated by NewTextureImage() above.
531 * from -- a pointer into client memory or a mesa temporary.
532 * sz -- nr bytes to copy.
534 void* (*TextureMemCpy
)( void *to
, const void *from
, size_t sz
);
537 * Called by glAreTextureResident().
539 GLboolean (*IsTextureResident
)( GLcontext
*ctx
,
540 struct gl_texture_object
*t
);
543 * Called by glPrioritizeTextures().
545 void (*PrioritizeTexture
)( GLcontext
*ctx
, struct gl_texture_object
*t
,
549 * Called by glActiveTextureARB() to set current texture unit.
551 void (*ActiveTexture
)( GLcontext
*ctx
, GLuint texUnitNumber
);
554 * Called when the texture's color lookup table is changed.
556 * If \p tObj is NULL then the shared texture palette
557 * gl_texture_object::Palette is to be updated.
559 void (*UpdateTexturePalette
)( GLcontext
*ctx
,
560 struct gl_texture_object
*tObj
);
565 * \name Imaging functionality
568 void (*CopyColorTable
)( GLcontext
*ctx
,
569 GLenum target
, GLenum internalformat
,
570 GLint x
, GLint y
, GLsizei width
);
572 void (*CopyColorSubTable
)( GLcontext
*ctx
,
573 GLenum target
, GLsizei start
,
574 GLint x
, GLint y
, GLsizei width
);
576 void (*CopyConvolutionFilter1D
)( GLcontext
*ctx
, GLenum target
,
577 GLenum internalFormat
,
578 GLint x
, GLint y
, GLsizei width
);
580 void (*CopyConvolutionFilter2D
)( GLcontext
*ctx
, GLenum target
,
581 GLenum internalFormat
,
583 GLsizei width
, GLsizei height
);
588 * \name Vertex/fragment program functions
591 /** Bind a vertex/fragment program */
592 void (*BindProgram
)(GLcontext
*ctx
, GLenum target
, struct gl_program
*prog
);
593 /** Allocate a new program */
594 struct gl_program
* (*NewProgram
)(GLcontext
*ctx
, GLenum target
, GLuint id
);
595 /** Delete a program */
596 void (*DeleteProgram
)(GLcontext
*ctx
, struct gl_program
*prog
);
597 /** Notify driver that a program string has been specified. */
598 void (*ProgramStringNotify
)(GLcontext
*ctx
, GLenum target
,
599 struct gl_program
*prog
);
600 /** Get value of a program register during program execution. */
601 void (*GetProgramRegister
)(GLcontext
*ctx
, enum register_file file
,
602 GLuint index
, GLfloat val
[4]);
604 /** Query if program can be loaded onto hardware */
605 GLboolean (*IsProgramNative
)(GLcontext
*ctx
, GLenum target
,
606 struct gl_program
*prog
);
612 * \name State-changing functions.
614 * \note drawing functions are above.
616 * These functions are called by their corresponding OpenGL API functions.
617 * They are \e also called by the gl_PopAttrib() function!!!
618 * May add more functions like these to the device driver in the future.
621 /** Specify the alpha test function */
622 void (*AlphaFunc
)(GLcontext
*ctx
, GLenum func
, GLfloat ref
);
623 /** Set the blend color */
624 void (*BlendColor
)(GLcontext
*ctx
, const GLfloat color
[4]);
625 /** Set the blend equation */
626 void (*BlendEquationSeparate
)(GLcontext
*ctx
, GLenum modeRGB
, GLenum modeA
);
627 /** Specify pixel arithmetic */
628 void (*BlendFuncSeparate
)(GLcontext
*ctx
,
629 GLenum sfactorRGB
, GLenum dfactorRGB
,
630 GLenum sfactorA
, GLenum dfactorA
);
631 /** Specify clear values for the color buffers */
632 void (*ClearColor
)(GLcontext
*ctx
, const GLfloat color
[4]);
633 /** Specify the clear value for the depth buffer */
634 void (*ClearDepth
)(GLcontext
*ctx
, GLclampd d
);
635 /** Specify the clear value for the color index buffers */
636 void (*ClearIndex
)(GLcontext
*ctx
, GLuint index
);
637 /** Specify the clear value for the stencil buffer */
638 void (*ClearStencil
)(GLcontext
*ctx
, GLint s
);
639 /** Specify a plane against which all geometry is clipped */
640 void (*ClipPlane
)(GLcontext
*ctx
, GLenum plane
, const GLfloat
*equation
);
641 /** Enable and disable writing of frame buffer color components */
642 void (*ColorMask
)(GLcontext
*ctx
, GLboolean rmask
, GLboolean gmask
,
643 GLboolean bmask
, GLboolean amask
);
644 /** Cause a material color to track the current color */
645 void (*ColorMaterial
)(GLcontext
*ctx
, GLenum face
, GLenum mode
);
646 /** Specify whether front- or back-facing facets can be culled */
647 void (*CullFace
)(GLcontext
*ctx
, GLenum mode
);
648 /** Define front- and back-facing polygons */
649 void (*FrontFace
)(GLcontext
*ctx
, GLenum mode
);
650 /** Specify the value used for depth buffer comparisons */
651 void (*DepthFunc
)(GLcontext
*ctx
, GLenum func
);
652 /** Enable or disable writing into the depth buffer */
653 void (*DepthMask
)(GLcontext
*ctx
, GLboolean flag
);
654 /** Specify mapping of depth values from NDC to window coordinates */
655 void (*DepthRange
)(GLcontext
*ctx
, GLclampd nearval
, GLclampd farval
);
656 /** Specify the current buffer for writing */
657 void (*DrawBuffer
)( GLcontext
*ctx
, GLenum buffer
);
658 /** Specify the buffers for writing for fragment programs*/
659 void (*DrawBuffers
)( GLcontext
*ctx
, GLsizei n
, const GLenum
*buffers
);
660 /** Enable or disable server-side gl capabilities */
661 void (*Enable
)(GLcontext
*ctx
, GLenum cap
, GLboolean state
);
662 /** Specify fog parameters */
663 void (*Fogfv
)(GLcontext
*ctx
, GLenum pname
, const GLfloat
*params
);
664 /** Specify implementation-specific hints */
665 void (*Hint
)(GLcontext
*ctx
, GLenum target
, GLenum mode
);
666 /** Control the writing of individual bits in the color index buffers */
667 void (*IndexMask
)(GLcontext
*ctx
, GLuint mask
);
668 /** Set light source parameters.
669 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
670 * been transformed to eye-space.
672 void (*Lightfv
)(GLcontext
*ctx
, GLenum light
,
673 GLenum pname
, const GLfloat
*params
);
674 /** Set the lighting model parameters */
675 void (*LightModelfv
)(GLcontext
*ctx
, GLenum pname
, const GLfloat
*params
);
676 /** Specify the line stipple pattern */
677 void (*LineStipple
)(GLcontext
*ctx
, GLint factor
, GLushort pattern
);
678 /** Specify the width of rasterized lines */
679 void (*LineWidth
)(GLcontext
*ctx
, GLfloat width
);
680 /** Specify a logical pixel operation for color index rendering */
681 void (*LogicOpcode
)(GLcontext
*ctx
, GLenum opcode
);
682 void (*PointParameterfv
)(GLcontext
*ctx
, GLenum pname
,
683 const GLfloat
*params
);
684 /** Specify the diameter of rasterized points */
685 void (*PointSize
)(GLcontext
*ctx
, GLfloat size
);
686 /** Select a polygon rasterization mode */
687 void (*PolygonMode
)(GLcontext
*ctx
, GLenum face
, GLenum mode
);
688 /** Set the scale and units used to calculate depth values */
689 void (*PolygonOffset
)(GLcontext
*ctx
, GLfloat factor
, GLfloat units
);
690 /** Set the polygon stippling pattern */
691 void (*PolygonStipple
)(GLcontext
*ctx
, const GLubyte
*mask
);
692 /* Specifies the current buffer for reading */
693 void (*ReadBuffer
)( GLcontext
*ctx
, GLenum buffer
);
694 /** Set rasterization mode */
695 void (*RenderMode
)(GLcontext
*ctx
, GLenum mode
);
696 /** Define the scissor box */
697 void (*Scissor
)(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
698 /** Select flat or smooth shading */
699 void (*ShadeModel
)(GLcontext
*ctx
, GLenum mode
);
700 /** OpenGL 2.0 two-sided StencilFunc */
701 void (*StencilFuncSeparate
)(GLcontext
*ctx
, GLenum face
, GLenum func
,
702 GLint ref
, GLuint mask
);
703 /** OpenGL 2.0 two-sided StencilMask */
704 void (*StencilMaskSeparate
)(GLcontext
*ctx
, GLenum face
, GLuint mask
);
705 /** OpenGL 2.0 two-sided StencilOp */
706 void (*StencilOpSeparate
)(GLcontext
*ctx
, GLenum face
, GLenum fail
,
707 GLenum zfail
, GLenum zpass
);
708 /** Control the generation of texture coordinates */
709 void (*TexGen
)(GLcontext
*ctx
, GLenum coord
, GLenum pname
,
710 const GLfloat
*params
);
711 /** Set texture environment parameters */
712 void (*TexEnv
)(GLcontext
*ctx
, GLenum target
, GLenum pname
,
713 const GLfloat
*param
);
714 /** Set texture parameters */
715 void (*TexParameter
)(GLcontext
*ctx
, GLenum target
,
716 struct gl_texture_object
*texObj
,
717 GLenum pname
, const GLfloat
*params
);
718 void (*TextureMatrix
)(GLcontext
*ctx
, GLuint unit
, const GLmatrix
*mat
);
719 /** Set the viewport */
720 void (*Viewport
)(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
725 * \name Vertex array functions
727 * Called by the corresponding OpenGL functions.
730 void (*VertexPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
731 GLsizei stride
, const GLvoid
*ptr
);
732 void (*NormalPointer
)(GLcontext
*ctx
, GLenum type
,
733 GLsizei stride
, const GLvoid
*ptr
);
734 void (*ColorPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
735 GLsizei stride
, const GLvoid
*ptr
);
736 void (*FogCoordPointer
)(GLcontext
*ctx
, GLenum type
,
737 GLsizei stride
, const GLvoid
*ptr
);
738 void (*IndexPointer
)(GLcontext
*ctx
, GLenum type
,
739 GLsizei stride
, const GLvoid
*ptr
);
740 void (*SecondaryColorPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
741 GLsizei stride
, const GLvoid
*ptr
);
742 void (*TexCoordPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
743 GLsizei stride
, const GLvoid
*ptr
);
744 void (*EdgeFlagPointer
)(GLcontext
*ctx
, GLsizei stride
, const GLvoid
*ptr
);
745 void (*VertexAttribPointer
)(GLcontext
*ctx
, GLuint index
, GLint size
,
746 GLenum type
, GLsizei stride
, const GLvoid
*ptr
);
747 void (*LockArraysEXT
)( GLcontext
*ctx
, GLint first
, GLsizei count
);
748 void (*UnlockArraysEXT
)( GLcontext
*ctx
);
753 * \name State-query functions
755 * Return GL_TRUE if query was completed, GL_FALSE otherwise.
758 /** Return the value or values of a selected parameter */
759 GLboolean (*GetBooleanv
)(GLcontext
*ctx
, GLenum pname
, GLboolean
*result
);
760 /** Return the value or values of a selected parameter */
761 GLboolean (*GetDoublev
)(GLcontext
*ctx
, GLenum pname
, GLdouble
*result
);
762 /** Return the value or values of a selected parameter */
763 GLboolean (*GetFloatv
)(GLcontext
*ctx
, GLenum pname
, GLfloat
*result
);
764 /** Return the value or values of a selected parameter */
765 GLboolean (*GetIntegerv
)(GLcontext
*ctx
, GLenum pname
, GLint
*result
);
766 /** Return the value or values of a selected parameter */
767 GLboolean (*GetPointerv
)(GLcontext
*ctx
, GLenum pname
, GLvoid
**result
);
772 * \name Vertex/pixel buffer object functions
774 #if FEATURE_ARB_vertex_buffer_object
776 void (*BindBuffer
)( GLcontext
*ctx
, GLenum target
,
777 struct gl_buffer_object
*obj
);
779 struct gl_buffer_object
* (*NewBufferObject
)( GLcontext
*ctx
, GLuint buffer
,
782 void (*DeleteBuffer
)( GLcontext
*ctx
, struct gl_buffer_object
*obj
);
784 void (*BufferData
)( GLcontext
*ctx
, GLenum target
, GLsizeiptrARB size
,
785 const GLvoid
*data
, GLenum usage
,
786 struct gl_buffer_object
*obj
);
788 void (*BufferSubData
)( GLcontext
*ctx
, GLenum target
, GLintptrARB offset
,
789 GLsizeiptrARB size
, const GLvoid
*data
,
790 struct gl_buffer_object
*obj
);
792 void (*GetBufferSubData
)( GLcontext
*ctx
, GLenum target
,
793 GLintptrARB offset
, GLsizeiptrARB size
,
794 GLvoid
*data
, struct gl_buffer_object
*obj
);
796 void * (*MapBuffer
)( GLcontext
*ctx
, GLenum target
, GLenum access
,
797 struct gl_buffer_object
*obj
);
799 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
801 void * (*MapBufferRange
)( GLcontext
*ctx
, GLenum target
,
802 GLintptr offset
, GLsizeiptr length
, GLbitfield access
,
803 struct gl_buffer_object
*obj
);
805 void (*FlushMappedBufferRange
) (GLcontext
*ctx
, GLenum target
,
806 GLintptr offset
, GLsizeiptr length
,
807 struct gl_buffer_object
*obj
);
809 GLboolean (*UnmapBuffer
)( GLcontext
*ctx
, GLenum target
,
810 struct gl_buffer_object
*obj
);
815 * \name Functions for GL_EXT_framebuffer_object
817 #if FEATURE_EXT_framebuffer_object
819 struct gl_framebuffer
* (*NewFramebuffer
)(GLcontext
*ctx
, GLuint name
);
820 struct gl_renderbuffer
* (*NewRenderbuffer
)(GLcontext
*ctx
, GLuint name
);
821 void (*BindFramebuffer
)(GLcontext
*ctx
, GLenum target
,
822 struct gl_framebuffer
*fb
, struct gl_framebuffer
*fbread
);
823 void (*FramebufferRenderbuffer
)(GLcontext
*ctx
,
824 struct gl_framebuffer
*fb
,
826 struct gl_renderbuffer
*rb
);
827 void (*RenderTexture
)(GLcontext
*ctx
,
828 struct gl_framebuffer
*fb
,
829 struct gl_renderbuffer_attachment
*att
);
830 void (*FinishRenderTexture
)(GLcontext
*ctx
,
831 struct gl_renderbuffer_attachment
*att
);
834 #if FEATURE_EXT_framebuffer_blit
835 void (*BlitFramebuffer
)(GLcontext
*ctx
,
836 GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
837 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
,
838 GLbitfield mask
, GLenum filter
);
842 * \name Query objects
845 struct gl_query_object
* (*NewQueryObject
)(GLcontext
*ctx
, GLuint id
);
846 void (*DeleteQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
847 void (*BeginQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
848 void (*EndQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
849 void (*CheckQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
850 void (*WaitQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
855 * \name Vertex Array objects
858 struct gl_array_object
* (*NewArrayObject
)(GLcontext
*ctx
, GLuint id
);
859 void (*DeleteArrayObject
)(GLcontext
*ctx
, struct gl_array_object
*obj
);
860 void (*BindArrayObject
)(GLcontext
*ctx
, struct gl_array_object
*obj
);
864 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
867 void (*AttachShader
)(GLcontext
*ctx
, GLuint program
, GLuint shader
);
868 void (*BindAttribLocation
)(GLcontext
*ctx
, GLuint program
, GLuint index
,
869 const GLcharARB
*name
);
870 void (*CompileShader
)(GLcontext
*ctx
, GLuint shader
);
871 GLuint (*CreateShader
)(GLcontext
*ctx
, GLenum type
);
872 GLuint (*CreateProgram
)(GLcontext
*ctx
);
873 void (*DeleteProgram2
)(GLcontext
*ctx
, GLuint program
);
874 void (*DeleteShader
)(GLcontext
*ctx
, GLuint shader
);
875 void (*DetachShader
)(GLcontext
*ctx
, GLuint program
, GLuint shader
);
876 void (*GetActiveAttrib
)(GLcontext
*ctx
, GLuint program
, GLuint index
,
877 GLsizei maxLength
, GLsizei
* length
, GLint
* size
,
878 GLenum
* type
, GLcharARB
* name
);
879 void (*GetActiveUniform
)(GLcontext
*ctx
, GLuint program
, GLuint index
,
880 GLsizei maxLength
, GLsizei
*length
, GLint
*size
,
881 GLenum
*type
, GLcharARB
*name
);
882 void (*GetAttachedShaders
)(GLcontext
*ctx
, GLuint program
, GLsizei maxCount
,
883 GLsizei
*count
, GLuint
*obj
);
884 GLint (*GetAttribLocation
)(GLcontext
*ctx
, GLuint program
,
885 const GLcharARB
*name
);
886 GLuint (*GetHandle
)(GLcontext
*ctx
, GLenum pname
);
887 void (*GetProgramiv
)(GLcontext
*ctx
, GLuint program
,
888 GLenum pname
, GLint
*params
);
889 void (*GetProgramInfoLog
)(GLcontext
*ctx
, GLuint program
, GLsizei bufSize
,
890 GLsizei
*length
, GLchar
*infoLog
);
891 void (*GetShaderiv
)(GLcontext
*ctx
, GLuint shader
,
892 GLenum pname
, GLint
*params
);
893 void (*GetShaderInfoLog
)(GLcontext
*ctx
, GLuint shader
, GLsizei bufSize
,
894 GLsizei
*length
, GLchar
*infoLog
);
895 void (*GetShaderSource
)(GLcontext
*ctx
, GLuint shader
, GLsizei maxLength
,
896 GLsizei
*length
, GLcharARB
*sourceOut
);
897 void (*GetUniformfv
)(GLcontext
*ctx
, GLuint program
, GLint location
,
899 void (*GetUniformiv
)(GLcontext
*ctx
, GLuint program
, GLint location
,
901 GLint (*GetUniformLocation
)(GLcontext
*ctx
, GLuint program
,
902 const GLcharARB
*name
);
903 GLboolean (*IsProgram
)(GLcontext
*ctx
, GLuint name
);
904 GLboolean (*IsShader
)(GLcontext
*ctx
, GLuint name
);
905 void (*LinkProgram
)(GLcontext
*ctx
, GLuint program
);
906 void (*ShaderSource
)(GLcontext
*ctx
, GLuint shader
, const GLchar
*source
);
907 void (*Uniform
)(GLcontext
*ctx
, GLint location
, GLsizei count
,
908 const GLvoid
*values
, GLenum type
);
909 void (*UniformMatrix
)(GLcontext
*ctx
, GLint cols
, GLint rows
,
910 GLenum matrixType
, GLint location
, GLsizei count
,
911 GLboolean transpose
, const GLfloat
*values
);
912 void (*UseProgram
)(GLcontext
*ctx
, GLuint program
);
913 void (*ValidateProgram
)(GLcontext
*ctx
, GLuint program
);
914 /* XXX many more to come */
919 * \name Support for multiple T&L engines
924 * Bitmask of state changes that require the current T&L module to be
925 * validated, using ValidateTnlModule() below.
930 * Validate the current T&L module.
932 * This is called directly after UpdateState() when a state change that has
933 * occurred matches the dd_function_table::NeedValidate bitmask above. This
934 * ensures all computed values are up to date, thus allowing the driver to
935 * decide if the current T&L module needs to be swapped out.
937 * This must be non-NULL if a driver installs a custom T&L module and sets
938 * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
940 void (*ValidateTnlModule
)( GLcontext
*ctx
, GLuint new_state
);
943 #define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
944 #define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
945 #define PRIM_UNKNOWN (GL_POLYGON+3)
948 * Set by the driver-supplied T&L engine.
950 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
952 GLuint CurrentExecPrimitive
;
955 * Current state of an in-progress compilation.
957 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
958 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
960 GLuint CurrentSavePrimitive
;
963 #define FLUSH_STORED_VERTICES 0x1
964 #define FLUSH_UPDATE_CURRENT 0x2
966 * Set by the driver-supplied T&L engine whenever vertices are buffered
967 * between glBegin()/glEnd() objects or __GLcontextRec::Current is not
970 * The dd_function_table::FlushVertices call below may be used to resolve
974 GLuint SaveNeedFlush
;
977 /* Called prior to any of the GLvertexformat functions being
978 * called. Paired with Driver.FlushVertices().
980 void (*BeginVertices
)( GLcontext
*ctx
);
983 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
984 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
985 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
986 * __GLcontextRec::Current and gl_light_attrib::Material
988 * Note that the default T&L engine never clears the
989 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
991 void (*FlushVertices
)( GLcontext
*ctx
, GLuint flags
);
992 void (*SaveFlushVertices
)( GLcontext
*ctx
);
995 * Give the driver the opportunity to hook in its own vtxfmt for
996 * compiling optimized display lists. This is called on each valid
997 * glBegin() during list compilation.
999 GLboolean (*NotifySaveBegin
)( GLcontext
*ctx
, GLenum mode
);
1002 * Notify driver that the special derived value _NeedEyeCoords has
1005 void (*LightingSpaceChange
)( GLcontext
*ctx
);
1008 * Called by glNewList().
1010 * Let the T&L component know what is going on with display lists
1011 * in time to make changes to dispatch tables, etc.
1013 void (*NewList
)( GLcontext
*ctx
, GLuint list
, GLenum mode
);
1015 * Called by glEndList().
1017 * \sa dd_function_table::NewList.
1019 void (*EndList
)( GLcontext
*ctx
);
1022 * Called by glCallList(s).
1024 * Notify the T&L component before and after calling a display list.
1026 void (*BeginCallList
)( GLcontext
*ctx
,
1027 struct mesa_display_list
*dlist
);
1029 * Called by glEndCallList().
1031 * \sa dd_function_table::BeginCallList.
1033 void (*EndCallList
)( GLcontext
*ctx
);
1039 * Transform/Clip/Lighting interface
1041 * Drivers present a reduced set of the functions possible in
1042 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
1043 * remaining functions to map down to these entry points.
1045 * These are the initial values to be installed into dispatch by
1046 * mesa. If the T&L driver wants to modify the dispatch table
1047 * while installed, it must do so itself. It would be possible for
1048 * the vertexformat to install it's own initial values for these
1049 * functions, but this way there is an obvious list of what is
1050 * expected of the driver.
1052 * If the driver wants to hook in entry points other than those
1053 * listed, it must restore them to their original values in
1054 * the disable() callback, below.
1061 void (GLAPIENTRYP ArrayElement
)( GLint
); /* NOTE */
1062 void (GLAPIENTRYP Color3f
)( GLfloat
, GLfloat
, GLfloat
);
1063 void (GLAPIENTRYP Color3fv
)( const GLfloat
* );
1064 void (GLAPIENTRYP Color4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1065 void (GLAPIENTRYP Color4fv
)( const GLfloat
* );
1066 void (GLAPIENTRYP EdgeFlag
)( GLboolean
);
1067 void (GLAPIENTRYP EvalCoord1f
)( GLfloat
); /* NOTE */
1068 void (GLAPIENTRYP EvalCoord1fv
)( const GLfloat
* ); /* NOTE */
1069 void (GLAPIENTRYP EvalCoord2f
)( GLfloat
, GLfloat
); /* NOTE */
1070 void (GLAPIENTRYP EvalCoord2fv
)( const GLfloat
* ); /* NOTE */
1071 void (GLAPIENTRYP EvalPoint1
)( GLint
); /* NOTE */
1072 void (GLAPIENTRYP EvalPoint2
)( GLint
, GLint
); /* NOTE */
1073 void (GLAPIENTRYP FogCoordfEXT
)( GLfloat
);
1074 void (GLAPIENTRYP FogCoordfvEXT
)( const GLfloat
* );
1075 void (GLAPIENTRYP Indexf
)( GLfloat
);
1076 void (GLAPIENTRYP Indexfv
)( const GLfloat
* );
1077 void (GLAPIENTRYP Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
* ); /* NOTE */
1078 void (GLAPIENTRYP MultiTexCoord1fARB
)( GLenum
, GLfloat
);
1079 void (GLAPIENTRYP MultiTexCoord1fvARB
)( GLenum
, const GLfloat
* );
1080 void (GLAPIENTRYP MultiTexCoord2fARB
)( GLenum
, GLfloat
, GLfloat
);
1081 void (GLAPIENTRYP MultiTexCoord2fvARB
)( GLenum
, const GLfloat
* );
1082 void (GLAPIENTRYP MultiTexCoord3fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
);
1083 void (GLAPIENTRYP MultiTexCoord3fvARB
)( GLenum
, const GLfloat
* );
1084 void (GLAPIENTRYP MultiTexCoord4fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1085 void (GLAPIENTRYP MultiTexCoord4fvARB
)( GLenum
, const GLfloat
* );
1086 void (GLAPIENTRYP Normal3f
)( GLfloat
, GLfloat
, GLfloat
);
1087 void (GLAPIENTRYP Normal3fv
)( const GLfloat
* );
1088 void (GLAPIENTRYP SecondaryColor3fEXT
)( GLfloat
, GLfloat
, GLfloat
);
1089 void (GLAPIENTRYP SecondaryColor3fvEXT
)( const GLfloat
* );
1090 void (GLAPIENTRYP TexCoord1f
)( GLfloat
);
1091 void (GLAPIENTRYP TexCoord1fv
)( const GLfloat
* );
1092 void (GLAPIENTRYP TexCoord2f
)( GLfloat
, GLfloat
);
1093 void (GLAPIENTRYP TexCoord2fv
)( const GLfloat
* );
1094 void (GLAPIENTRYP TexCoord3f
)( GLfloat
, GLfloat
, GLfloat
);
1095 void (GLAPIENTRYP TexCoord3fv
)( const GLfloat
* );
1096 void (GLAPIENTRYP TexCoord4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1097 void (GLAPIENTRYP TexCoord4fv
)( const GLfloat
* );
1098 void (GLAPIENTRYP Vertex2f
)( GLfloat
, GLfloat
);
1099 void (GLAPIENTRYP Vertex2fv
)( const GLfloat
* );
1100 void (GLAPIENTRYP Vertex3f
)( GLfloat
, GLfloat
, GLfloat
);
1101 void (GLAPIENTRYP Vertex3fv
)( const GLfloat
* );
1102 void (GLAPIENTRYP Vertex4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1103 void (GLAPIENTRYP Vertex4fv
)( const GLfloat
* );
1104 void (GLAPIENTRYP CallList
)( GLuint
); /* NOTE */
1105 void (GLAPIENTRYP CallLists
)( GLsizei
, GLenum
, const GLvoid
* ); /* NOTE */
1106 void (GLAPIENTRYP Begin
)( GLenum
);
1107 void (GLAPIENTRYP End
)( void );
1108 /* GL_NV_vertex_program */
1109 void (GLAPIENTRYP VertexAttrib1fNV
)( GLuint index
, GLfloat x
);
1110 void (GLAPIENTRYP VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
);
1111 void (GLAPIENTRYP VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
);
1112 void (GLAPIENTRYP VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
);
1113 void (GLAPIENTRYP VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1114 void (GLAPIENTRYP VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
);
1115 void (GLAPIENTRYP VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1116 void (GLAPIENTRYP VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
);
1117 #if FEATURE_ARB_vertex_program
1118 void (GLAPIENTRYP VertexAttrib1fARB
)( GLuint index
, GLfloat x
);
1119 void (GLAPIENTRYP VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
);
1120 void (GLAPIENTRYP VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
);
1121 void (GLAPIENTRYP VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
);
1122 void (GLAPIENTRYP VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1123 void (GLAPIENTRYP VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
);
1124 void (GLAPIENTRYP VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1125 void (GLAPIENTRYP VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
);
1131 void (GLAPIENTRYP Rectf
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1137 void (GLAPIENTRYP DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
);
1138 void (GLAPIENTRYP DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
1139 const GLvoid
*indices
);
1140 void (GLAPIENTRYP DrawRangeElements
)( GLenum mode
, GLuint start
,
1141 GLuint end
, GLsizei count
,
1142 GLenum type
, const GLvoid
*indices
);
1148 * If you don't support eval, fallback to the default vertex format
1149 * on receiving an eval call and use the pipeline mechanism to
1150 * provide partial T&L acceleration.
1152 * Mesa will provide a set of helper functions to do eval within
1153 * accelerated vertex formats, eventually...
1156 void (GLAPIENTRYP EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
);
1157 void (GLAPIENTRYP EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
, GLint j1
, GLint j2
);
1163 #endif /* DD_INCLUDED */