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 !!!!! */
38 struct gl_buffer_object
;
40 struct gl_display_list
;
41 struct gl_framebuffer
;
42 struct gl_pixelstore_attrib
;
44 struct gl_renderbuffer
;
45 struct gl_renderbuffer_attachment
;
47 struct gl_shader_program
;
48 struct gl_texture_image
;
49 struct gl_texture_object
;
51 /* GL_ARB_vertex_buffer_object */
52 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
53 * NULL) if buffer is unavailable for immediate mapping.
55 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
56 * would require more book-keeping in the driver than seems necessary
59 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
60 * want to provoke the driver to throw away the old storage, we will
61 * respect the contents of already referenced data.
63 #define MESA_MAP_NOWAIT_BIT 0x0040
67 * Device driver function table.
68 * Core Mesa uses these function pointers to call into device drivers.
69 * Most of these functions directly correspond to OpenGL state commands.
70 * Core Mesa will call these functions after error checking has been done
71 * so that the drivers don't have to worry about error testing.
73 * Vertex transformation/clipping/lighting is patched into the T&L module.
74 * Rasterization functions are patched into the swrast module.
76 * Note: when new functions are added here, the drivers/common/driverfuncs.c
77 * file should be updated too!!!
79 struct dd_function_table
{
81 * Return a string as needed by glGetString().
82 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
85 const GLubyte
* (*GetString
)( struct gl_context
*ctx
, GLenum name
);
88 * Notify the driver after Mesa has made some internal state changes.
90 * This is in addition to any state change callbacks Mesa may already have
93 void (*UpdateState
)( struct gl_context
*ctx
, GLbitfield new_state
);
96 * Get the width and height of the named buffer/window.
98 * Mesa uses this to determine when the driver's window size has changed.
99 * XXX OBSOLETE: this function will be removed in the future.
101 void (*GetBufferSize
)( struct gl_framebuffer
*buffer
,
102 GLuint
*width
, GLuint
*height
);
105 * Resize the given framebuffer to the given size.
106 * XXX OBSOLETE: this function will be removed in the future.
108 void (*ResizeBuffers
)( struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
109 GLuint width
, GLuint height
);
112 * Called whenever an error is generated.
113 * __struct gl_contextRec::ErrorValue contains the error value.
115 void (*Error
)( struct gl_context
*ctx
);
118 * This is called whenever glFinish() is called.
120 void (*Finish
)( struct gl_context
*ctx
);
123 * This is called whenever glFlush() is called.
125 void (*Flush
)( struct gl_context
*ctx
);
128 * Clear the color/depth/stencil/accum buffer(s).
129 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
130 * renderbuffers need to be cleared.
132 void (*Clear
)( struct gl_context
*ctx
, GLbitfield buffers
);
135 * Execute glAccum command.
137 void (*Accum
)( struct gl_context
*ctx
, GLenum op
, GLfloat value
);
141 * Execute glRasterPos, updating the ctx->Current.Raster fields
143 void (*RasterPos
)( struct gl_context
*ctx
, const GLfloat v
[4] );
146 * \name Image-related functions
151 * Called by glDrawPixels().
152 * \p unpack describes how to unpack the source image data.
154 void (*DrawPixels
)( struct gl_context
*ctx
,
155 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
156 GLenum format
, GLenum type
,
157 const struct gl_pixelstore_attrib
*unpack
,
158 const GLvoid
*pixels
);
161 * Called by glReadPixels().
163 void (*ReadPixels
)( struct gl_context
*ctx
,
164 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
165 GLenum format
, GLenum type
,
166 const struct gl_pixelstore_attrib
*unpack
,
170 * Called by glCopyPixels().
172 void (*CopyPixels
)( struct gl_context
*ctx
, GLint srcx
, GLint srcy
,
173 GLsizei width
, GLsizei height
,
174 GLint dstx
, GLint dsty
, GLenum type
);
177 * Called by glBitmap().
179 void (*Bitmap
)( struct gl_context
*ctx
,
180 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
181 const struct gl_pixelstore_attrib
*unpack
,
182 const GLubyte
*bitmap
);
187 * \name Texture image functions
192 * Choose actual hardware texture format given the user-provided source
193 * image format and type and the desired internal format. In some
194 * cases, srcFormat and srcType can be GL_NONE.
195 * Called by glTexImage(), etc.
197 gl_format (*ChooseTextureFormat
)( struct gl_context
*ctx
, GLint internalFormat
,
198 GLenum srcFormat
, GLenum srcType
);
201 * Called by glTexImage1D(). Simply copy the source texture data into the
202 * destination texture memory. The gl_texture_image fields, etc. will be
204 * The parameters are the same as glTexImage1D(), plus:
205 * \param packing describes how to unpack the source data.
206 * \param texObj is the target texture object.
207 * \param texImage is the target texture image.
209 void (*TexImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
210 GLint internalFormat
,
211 GLint width
, GLint border
,
212 GLenum format
, GLenum type
, const GLvoid
*pixels
,
213 const struct gl_pixelstore_attrib
*packing
,
214 struct gl_texture_object
*texObj
,
215 struct gl_texture_image
*texImage
);
218 * Called by glTexImage2D().
220 * \sa dd_function_table::TexImage1D.
222 void (*TexImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
223 GLint internalFormat
,
224 GLint width
, GLint height
, GLint border
,
225 GLenum format
, GLenum type
, const GLvoid
*pixels
,
226 const struct gl_pixelstore_attrib
*packing
,
227 struct gl_texture_object
*texObj
,
228 struct gl_texture_image
*texImage
);
231 * Called by glTexImage3D().
233 * \sa dd_function_table::TexImage1D.
235 void (*TexImage3D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
236 GLint internalFormat
,
237 GLint width
, GLint height
, GLint depth
, GLint border
,
238 GLenum format
, GLenum type
, const GLvoid
*pixels
,
239 const struct gl_pixelstore_attrib
*packing
,
240 struct gl_texture_object
*texObj
,
241 struct gl_texture_image
*texImage
);
244 * Called by glTexSubImage1D(). Replace a subset of the target texture
245 * with new texel data.
246 * \sa dd_function_table::TexImage1D.
248 void (*TexSubImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
249 GLint xoffset
, GLsizei width
,
250 GLenum format
, GLenum type
,
251 const GLvoid
*pixels
,
252 const struct gl_pixelstore_attrib
*packing
,
253 struct gl_texture_object
*texObj
,
254 struct gl_texture_image
*texImage
);
257 * Called by glTexSubImage2D().
259 * \sa dd_function_table::TexSubImage1D.
261 void (*TexSubImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
262 GLint xoffset
, GLint yoffset
,
263 GLsizei width
, GLsizei height
,
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 glTexSubImage3D().
273 * \sa dd_function_table::TexSubImage1D.
275 void (*TexSubImage3D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
276 GLint xoffset
, GLint yoffset
, GLint zoffset
,
277 GLsizei width
, GLsizei height
, GLint depth
,
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 glGetTexImage().
287 void (*GetTexImage
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
288 GLenum format
, GLenum type
, GLvoid
*pixels
,
289 struct gl_texture_object
*texObj
,
290 struct gl_texture_image
*texImage
);
293 * Called by glCopyTexSubImage1D().
295 * Drivers should use a fallback routine from texstore.c if needed.
297 void (*CopyTexSubImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
299 GLint x
, GLint y
, GLsizei width
);
301 * Called by glCopyTexSubImage2D().
303 * Drivers should use a fallback routine from texstore.c if needed.
305 void (*CopyTexSubImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
306 GLint xoffset
, GLint yoffset
,
308 GLsizei width
, GLsizei height
);
310 * Called by glCopyTexSubImage3D().
312 * Drivers should use a fallback routine from texstore.c if needed.
314 void (*CopyTexSubImage3D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
315 GLint xoffset
, GLint yoffset
, GLint zoffset
,
317 GLsizei width
, GLsizei height
);
320 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
322 void (*GenerateMipmap
)(struct gl_context
*ctx
, GLenum target
,
323 struct gl_texture_object
*texObj
);
326 * Called by glTexImage[123]D when user specifies a proxy texture
329 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
331 GLboolean (*TestProxyTexImage
)(struct gl_context
*ctx
, GLenum target
,
332 GLint level
, GLint internalFormat
,
333 GLenum format
, GLenum type
,
334 GLint width
, GLint height
,
335 GLint depth
, GLint border
);
340 * \name Compressed texture functions
345 * Called by glCompressedTexImage1D().
347 * \param target user specified.
348 * \param format user specified.
349 * \param type user specified.
350 * \param pixels user specified.
351 * \param packing indicates the image packing of pixels.
352 * \param texObj is the target texture object.
353 * \param texImage is the target texture image. It will have the texture \p
354 * width, \p height, \p depth, \p border and \p internalFormat information.
356 * \a retainInternalCopy is returned by this function and indicates whether
357 * core Mesa should keep an internal copy of the texture image.
359 void (*CompressedTexImage1D
)( struct gl_context
*ctx
, GLenum target
,
360 GLint level
, GLint internalFormat
,
361 GLsizei width
, GLint border
,
362 GLsizei imageSize
, const GLvoid
*data
,
363 struct gl_texture_object
*texObj
,
364 struct gl_texture_image
*texImage
);
366 * Called by glCompressedTexImage2D().
368 * \sa dd_function_table::CompressedTexImage1D.
370 void (*CompressedTexImage2D
)( struct gl_context
*ctx
, GLenum target
,
371 GLint level
, GLint internalFormat
,
372 GLsizei width
, GLsizei height
, GLint border
,
373 GLsizei imageSize
, const GLvoid
*data
,
374 struct gl_texture_object
*texObj
,
375 struct gl_texture_image
*texImage
);
377 * Called by glCompressedTexImage3D().
379 * \sa dd_function_table::CompressedTexImage3D.
381 void (*CompressedTexImage3D
)( struct gl_context
*ctx
, GLenum target
,
382 GLint level
, GLint internalFormat
,
383 GLsizei width
, GLsizei height
, GLsizei depth
,
385 GLsizei imageSize
, const GLvoid
*data
,
386 struct gl_texture_object
*texObj
,
387 struct gl_texture_image
*texImage
);
390 * Called by glCompressedTexSubImage1D().
392 * \param target user specified.
393 * \param level user specified.
394 * \param xoffset user specified.
395 * \param yoffset user specified.
396 * \param zoffset user specified.
397 * \param width user specified.
398 * \param height user specified.
399 * \param depth user specified.
400 * \param imageSize user specified.
401 * \param data user specified.
402 * \param texObj is the target texture object.
403 * \param texImage is the target texture image. It will have the texture \p
404 * width, \p height, \p depth, \p border and \p internalFormat information.
406 void (*CompressedTexSubImage1D
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
407 GLint xoffset
, GLsizei width
,
409 GLsizei imageSize
, const GLvoid
*data
,
410 struct gl_texture_object
*texObj
,
411 struct gl_texture_image
*texImage
);
413 * Called by glCompressedTexSubImage2D().
415 * \sa dd_function_table::CompressedTexImage3D.
417 void (*CompressedTexSubImage2D
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
418 GLint xoffset
, GLint yoffset
,
419 GLsizei width
, GLint height
,
421 GLsizei imageSize
, const GLvoid
*data
,
422 struct gl_texture_object
*texObj
,
423 struct gl_texture_image
*texImage
);
425 * Called by glCompressedTexSubImage3D().
427 * \sa dd_function_table::CompressedTexImage3D.
429 void (*CompressedTexSubImage3D
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
430 GLint xoffset
, GLint yoffset
, GLint zoffset
,
431 GLsizei width
, GLint height
, GLint depth
,
433 GLsizei imageSize
, const GLvoid
*data
,
434 struct gl_texture_object
*texObj
,
435 struct gl_texture_image
*texImage
);
439 * Called by glGetCompressedTexImage.
441 void (*GetCompressedTexImage
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
443 struct gl_texture_object
*texObj
,
444 struct gl_texture_image
*texImage
);
449 * \name Texture object functions
454 * Called by glBindTexture().
456 void (*BindTexture
)( struct gl_context
*ctx
, GLenum target
,
457 struct gl_texture_object
*tObj
);
460 * Called to allocate a new texture object.
461 * A new gl_texture_object should be returned. The driver should
462 * attach to it any device-specific info it needs.
464 struct gl_texture_object
* (*NewTextureObject
)( struct gl_context
*ctx
, GLuint name
,
467 * Called when a texture object is about to be deallocated.
469 * Driver should delete the gl_texture_object object and anything
472 void (*DeleteTexture
)( struct gl_context
*ctx
, struct gl_texture_object
*tObj
);
475 * Called to allocate a new texture image object.
477 struct gl_texture_image
* (*NewTextureImage
)( struct gl_context
*ctx
);
480 * Called to free tImage->Data.
482 void (*FreeTextureImageBuffer
)( struct gl_context
*ctx
, struct gl_texture_image
*tImage
);
484 /** Map texture image data into user space */
485 void (*MapTexture
)( struct gl_context
*ctx
, struct gl_texture_object
*tObj
);
486 /** Unmap texture images from user space */
487 void (*UnmapTexture
)( struct gl_context
*ctx
, struct gl_texture_object
*tObj
);
490 * Note: no context argument. This function doesn't initially look
491 * like it belongs here, except that the driver is the only entity
492 * that knows for sure how the texture memory is allocated - via
493 * the above callbacks. There is then an argument that the driver
494 * knows what memcpy paths might be fast. Typically this is invoked with
496 * to -- a pointer into texture memory allocated by NewTextureImage() above.
497 * from -- a pointer into client memory or a mesa temporary.
498 * sz -- nr bytes to copy.
500 void* (*TextureMemCpy
)( void *to
, const void *from
, size_t sz
);
503 * Called by glAreTextureResident().
505 GLboolean (*IsTextureResident
)( struct gl_context
*ctx
,
506 struct gl_texture_object
*t
);
509 * Called when the texture's color lookup table is changed.
511 * If \p tObj is NULL then the shared texture palette
512 * gl_texture_object::Palette is to be updated.
514 void (*UpdateTexturePalette
)( struct gl_context
*ctx
,
515 struct gl_texture_object
*tObj
);
520 * \name Imaging functionality
523 void (*CopyColorTable
)( struct gl_context
*ctx
,
524 GLenum target
, GLenum internalformat
,
525 GLint x
, GLint y
, GLsizei width
);
527 void (*CopyColorSubTable
)( struct gl_context
*ctx
,
528 GLenum target
, GLsizei start
,
529 GLint x
, GLint y
, GLsizei width
);
534 * \name Vertex/fragment program functions
537 /** Bind a vertex/fragment program */
538 void (*BindProgram
)(struct gl_context
*ctx
, GLenum target
, struct gl_program
*prog
);
539 /** Allocate a new program */
540 struct gl_program
* (*NewProgram
)(struct gl_context
*ctx
, GLenum target
, GLuint id
);
541 /** Delete a program */
542 void (*DeleteProgram
)(struct gl_context
*ctx
, struct gl_program
*prog
);
544 * Notify driver that a program string (and GPU code) has been specified
545 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
546 * supported by the driver.
548 GLboolean (*ProgramStringNotify
)(struct gl_context
*ctx
, GLenum target
,
549 struct gl_program
*prog
);
551 /** Query if program can be loaded onto hardware */
552 GLboolean (*IsProgramNative
)(struct gl_context
*ctx
, GLenum target
,
553 struct gl_program
*prog
);
558 * \name GLSL shader/program functions.
562 * Called when a shader program is linked.
564 * This gives drivers an opportunity to clone the IR and make their
565 * own transformations on it for the purposes of code generation.
567 GLboolean (*LinkShader
)(struct gl_context
*ctx
, struct gl_shader_program
*shader
);
571 * \name State-changing functions.
573 * \note drawing functions are above.
575 * These functions are called by their corresponding OpenGL API functions.
576 * They are \e also called by the gl_PopAttrib() function!!!
577 * May add more functions like these to the device driver in the future.
580 /** Specify the alpha test function */
581 void (*AlphaFunc
)(struct gl_context
*ctx
, GLenum func
, GLfloat ref
);
582 /** Set the blend color */
583 void (*BlendColor
)(struct gl_context
*ctx
, const GLfloat color
[4]);
584 /** Set the blend equation */
585 void (*BlendEquationSeparate
)(struct gl_context
*ctx
, GLenum modeRGB
, GLenum modeA
);
586 void (*BlendEquationSeparatei
)(struct gl_context
*ctx
, GLuint buffer
,
587 GLenum modeRGB
, GLenum modeA
);
588 /** Specify pixel arithmetic */
589 void (*BlendFuncSeparate
)(struct gl_context
*ctx
,
590 GLenum sfactorRGB
, GLenum dfactorRGB
,
591 GLenum sfactorA
, GLenum dfactorA
);
592 void (*BlendFuncSeparatei
)(struct gl_context
*ctx
, GLuint buffer
,
593 GLenum sfactorRGB
, GLenum dfactorRGB
,
594 GLenum sfactorA
, GLenum dfactorA
);
595 /** Specify clear values for the color buffers */
596 void (*ClearColor
)(struct gl_context
*ctx
, const GLfloat color
[4]);
597 /** Specify the clear value for the depth buffer */
598 void (*ClearDepth
)(struct gl_context
*ctx
, GLclampd d
);
599 /** Specify the clear value for the stencil buffer */
600 void (*ClearStencil
)(struct gl_context
*ctx
, GLint s
);
601 /** Specify a plane against which all geometry is clipped */
602 void (*ClipPlane
)(struct gl_context
*ctx
, GLenum plane
, const GLfloat
*equation
);
603 /** Enable and disable writing of frame buffer color components */
604 void (*ColorMask
)(struct gl_context
*ctx
, GLboolean rmask
, GLboolean gmask
,
605 GLboolean bmask
, GLboolean amask
);
606 void (*ColorMaskIndexed
)(struct gl_context
*ctx
, GLuint buf
, GLboolean rmask
,
607 GLboolean gmask
, GLboolean bmask
, GLboolean amask
);
608 /** Cause a material color to track the current color */
609 void (*ColorMaterial
)(struct gl_context
*ctx
, GLenum face
, GLenum mode
);
610 /** Specify whether front- or back-facing facets can be culled */
611 void (*CullFace
)(struct gl_context
*ctx
, GLenum mode
);
612 /** Define front- and back-facing polygons */
613 void (*FrontFace
)(struct gl_context
*ctx
, GLenum mode
);
614 /** Specify the value used for depth buffer comparisons */
615 void (*DepthFunc
)(struct gl_context
*ctx
, GLenum func
);
616 /** Enable or disable writing into the depth buffer */
617 void (*DepthMask
)(struct gl_context
*ctx
, GLboolean flag
);
618 /** Specify mapping of depth values from NDC to window coordinates */
619 void (*DepthRange
)(struct gl_context
*ctx
, GLclampd nearval
, GLclampd farval
);
620 /** Specify the current buffer for writing */
621 void (*DrawBuffer
)( struct gl_context
*ctx
, GLenum buffer
);
622 /** Specify the buffers for writing for fragment programs*/
623 void (*DrawBuffers
)( struct gl_context
*ctx
, GLsizei n
, const GLenum
*buffers
);
624 /** Enable or disable server-side gl capabilities */
625 void (*Enable
)(struct gl_context
*ctx
, GLenum cap
, GLboolean state
);
626 /** Specify fog parameters */
627 void (*Fogfv
)(struct gl_context
*ctx
, GLenum pname
, const GLfloat
*params
);
628 /** Specify implementation-specific hints */
629 void (*Hint
)(struct gl_context
*ctx
, GLenum target
, GLenum mode
);
630 /** Set light source parameters.
631 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
632 * been transformed to eye-space.
634 void (*Lightfv
)(struct gl_context
*ctx
, GLenum light
,
635 GLenum pname
, const GLfloat
*params
);
636 /** Set the lighting model parameters */
637 void (*LightModelfv
)(struct gl_context
*ctx
, GLenum pname
, const GLfloat
*params
);
638 /** Specify the line stipple pattern */
639 void (*LineStipple
)(struct gl_context
*ctx
, GLint factor
, GLushort pattern
);
640 /** Specify the width of rasterized lines */
641 void (*LineWidth
)(struct gl_context
*ctx
, GLfloat width
);
642 /** Specify a logical pixel operation for color index rendering */
643 void (*LogicOpcode
)(struct gl_context
*ctx
, GLenum opcode
);
644 void (*PointParameterfv
)(struct gl_context
*ctx
, GLenum pname
,
645 const GLfloat
*params
);
646 /** Specify the diameter of rasterized points */
647 void (*PointSize
)(struct gl_context
*ctx
, GLfloat size
);
648 /** Select a polygon rasterization mode */
649 void (*PolygonMode
)(struct gl_context
*ctx
, GLenum face
, GLenum mode
);
650 /** Set the scale and units used to calculate depth values */
651 void (*PolygonOffset
)(struct gl_context
*ctx
, GLfloat factor
, GLfloat units
);
652 /** Set the polygon stippling pattern */
653 void (*PolygonStipple
)(struct gl_context
*ctx
, const GLubyte
*mask
);
654 /* Specifies the current buffer for reading */
655 void (*ReadBuffer
)( struct gl_context
*ctx
, GLenum buffer
);
656 /** Set rasterization mode */
657 void (*RenderMode
)(struct gl_context
*ctx
, GLenum mode
);
658 /** Define the scissor box */
659 void (*Scissor
)(struct gl_context
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
660 /** Select flat or smooth shading */
661 void (*ShadeModel
)(struct gl_context
*ctx
, GLenum mode
);
662 /** OpenGL 2.0 two-sided StencilFunc */
663 void (*StencilFuncSeparate
)(struct gl_context
*ctx
, GLenum face
, GLenum func
,
664 GLint ref
, GLuint mask
);
665 /** OpenGL 2.0 two-sided StencilMask */
666 void (*StencilMaskSeparate
)(struct gl_context
*ctx
, GLenum face
, GLuint mask
);
667 /** OpenGL 2.0 two-sided StencilOp */
668 void (*StencilOpSeparate
)(struct gl_context
*ctx
, GLenum face
, GLenum fail
,
669 GLenum zfail
, GLenum zpass
);
670 /** Control the generation of texture coordinates */
671 void (*TexGen
)(struct gl_context
*ctx
, GLenum coord
, GLenum pname
,
672 const GLfloat
*params
);
673 /** Set texture environment parameters */
674 void (*TexEnv
)(struct gl_context
*ctx
, GLenum target
, GLenum pname
,
675 const GLfloat
*param
);
676 /** Set texture parameters */
677 void (*TexParameter
)(struct gl_context
*ctx
, GLenum target
,
678 struct gl_texture_object
*texObj
,
679 GLenum pname
, const GLfloat
*params
);
680 /** Set the viewport */
681 void (*Viewport
)(struct gl_context
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
686 * \name Vertex/pixel buffer object functions
689 void (*BindBuffer
)( struct gl_context
*ctx
, GLenum target
,
690 struct gl_buffer_object
*obj
);
692 struct gl_buffer_object
* (*NewBufferObject
)( struct gl_context
*ctx
, GLuint buffer
,
695 void (*DeleteBuffer
)( struct gl_context
*ctx
, struct gl_buffer_object
*obj
);
697 GLboolean (*BufferData
)( struct gl_context
*ctx
, GLenum target
, GLsizeiptrARB size
,
698 const GLvoid
*data
, GLenum usage
,
699 struct gl_buffer_object
*obj
);
701 void (*BufferSubData
)( struct gl_context
*ctx
, GLintptrARB offset
,
702 GLsizeiptrARB size
, const GLvoid
*data
,
703 struct gl_buffer_object
*obj
);
705 void (*GetBufferSubData
)( struct gl_context
*ctx
,
706 GLintptrARB offset
, GLsizeiptrARB size
,
707 GLvoid
*data
, struct gl_buffer_object
*obj
);
709 void (*CopyBufferSubData
)( struct gl_context
*ctx
,
710 struct gl_buffer_object
*src
,
711 struct gl_buffer_object
*dst
,
712 GLintptr readOffset
, GLintptr writeOffset
,
715 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
717 void * (*MapBufferRange
)( struct gl_context
*ctx
, GLintptr offset
,
718 GLsizeiptr length
, GLbitfield access
,
719 struct gl_buffer_object
*obj
);
721 void (*FlushMappedBufferRange
)(struct gl_context
*ctx
,
722 GLintptr offset
, GLsizeiptr length
,
723 struct gl_buffer_object
*obj
);
725 GLboolean (*UnmapBuffer
)( struct gl_context
*ctx
,
726 struct gl_buffer_object
*obj
);
730 * \name Functions for GL_APPLE_object_purgeable
733 /* variations on ObjectPurgeable */
734 GLenum (*BufferObjectPurgeable
)( struct gl_context
*ctx
, struct gl_buffer_object
*obj
, GLenum option
);
735 GLenum (*RenderObjectPurgeable
)( struct gl_context
*ctx
, struct gl_renderbuffer
*obj
, GLenum option
);
736 GLenum (*TextureObjectPurgeable
)( struct gl_context
*ctx
, struct gl_texture_object
*obj
, GLenum option
);
738 /* variations on ObjectUnpurgeable */
739 GLenum (*BufferObjectUnpurgeable
)( struct gl_context
*ctx
, struct gl_buffer_object
*obj
, GLenum option
);
740 GLenum (*RenderObjectUnpurgeable
)( struct gl_context
*ctx
, struct gl_renderbuffer
*obj
, GLenum option
);
741 GLenum (*TextureObjectUnpurgeable
)( struct gl_context
*ctx
, struct gl_texture_object
*obj
, GLenum option
);
745 * \name Functions for GL_EXT_framebuffer_{object,blit}.
748 struct gl_framebuffer
* (*NewFramebuffer
)(struct gl_context
*ctx
, GLuint name
);
749 struct gl_renderbuffer
* (*NewRenderbuffer
)(struct gl_context
*ctx
, GLuint name
);
750 void (*BindFramebuffer
)(struct gl_context
*ctx
, GLenum target
,
751 struct gl_framebuffer
*drawFb
,
752 struct gl_framebuffer
*readFb
);
753 void (*FramebufferRenderbuffer
)(struct gl_context
*ctx
,
754 struct gl_framebuffer
*fb
,
756 struct gl_renderbuffer
*rb
);
757 void (*RenderTexture
)(struct gl_context
*ctx
,
758 struct gl_framebuffer
*fb
,
759 struct gl_renderbuffer_attachment
*att
);
760 void (*FinishRenderTexture
)(struct gl_context
*ctx
,
761 struct gl_renderbuffer_attachment
*att
);
762 void (*ValidateFramebuffer
)(struct gl_context
*ctx
,
763 struct gl_framebuffer
*fb
);
765 void (*BlitFramebuffer
)(struct gl_context
*ctx
,
766 GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
767 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
,
768 GLbitfield mask
, GLenum filter
);
771 * \name Query objects
774 struct gl_query_object
* (*NewQueryObject
)(struct gl_context
*ctx
, GLuint id
);
775 void (*DeleteQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
776 void (*BeginQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
777 void (*EndQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
778 void (*CheckQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
779 void (*WaitQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
784 * \name Vertex Array objects
787 struct gl_array_object
* (*NewArrayObject
)(struct gl_context
*ctx
, GLuint id
);
788 void (*DeleteArrayObject
)(struct gl_context
*ctx
, struct gl_array_object
*obj
);
789 void (*BindArrayObject
)(struct gl_context
*ctx
, struct gl_array_object
*obj
);
793 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
796 struct gl_shader
*(*NewShader
)(struct gl_context
*ctx
, GLuint name
, GLenum type
);
797 void (*DeleteShader
)(struct gl_context
*ctx
, struct gl_shader
*shader
);
798 struct gl_shader_program
*(*NewShaderProgram
)(struct gl_context
*ctx
, GLuint name
);
799 void (*DeleteShaderProgram
)(struct gl_context
*ctx
,
800 struct gl_shader_program
*shProg
);
801 void (*UseProgram
)(struct gl_context
*ctx
, struct gl_shader_program
*shProg
);
806 * \name Support for multiple T&L engines
811 * Bitmask of state changes that require the current T&L module to be
812 * validated, using ValidateTnlModule() below.
817 * Validate the current T&L module.
819 * This is called directly after UpdateState() when a state change that has
820 * occurred matches the dd_function_table::NeedValidate bitmask above. This
821 * ensures all computed values are up to date, thus allowing the driver to
822 * decide if the current T&L module needs to be swapped out.
824 * This must be non-NULL if a driver installs a custom T&L module and sets
825 * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
827 void (*ValidateTnlModule
)( struct gl_context
*ctx
, GLuint new_state
);
830 * Set by the driver-supplied T&L engine.
832 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
834 GLuint CurrentExecPrimitive
;
837 * Current state of an in-progress compilation.
839 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
840 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
842 GLuint CurrentSavePrimitive
;
845 #define FLUSH_STORED_VERTICES 0x1
846 #define FLUSH_UPDATE_CURRENT 0x2
848 * Set by the driver-supplied T&L engine whenever vertices are buffered
849 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not
852 * The dd_function_table::FlushVertices call below may be used to resolve
856 GLuint SaveNeedFlush
;
859 /* Called prior to any of the GLvertexformat functions being
860 * called. Paired with Driver.FlushVertices().
862 void (*BeginVertices
)( struct gl_context
*ctx
);
865 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
866 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
867 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
868 * __struct gl_contextRec::Current and gl_light_attrib::Material
870 * Note that the default T&L engine never clears the
871 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
873 void (*FlushVertices
)( struct gl_context
*ctx
, GLuint flags
);
874 void (*SaveFlushVertices
)( struct gl_context
*ctx
);
877 * Give the driver the opportunity to hook in its own vtxfmt for
878 * compiling optimized display lists. This is called on each valid
879 * glBegin() during list compilation.
881 GLboolean (*NotifySaveBegin
)( struct gl_context
*ctx
, GLenum mode
);
884 * Notify driver that the special derived value _NeedEyeCoords has
887 void (*LightingSpaceChange
)( struct gl_context
*ctx
);
890 * Called by glNewList().
892 * Let the T&L component know what is going on with display lists
893 * in time to make changes to dispatch tables, etc.
895 void (*NewList
)( struct gl_context
*ctx
, GLuint list
, GLenum mode
);
897 * Called by glEndList().
899 * \sa dd_function_table::NewList.
901 void (*EndList
)( struct gl_context
*ctx
);
904 * Called by glCallList(s).
906 * Notify the T&L component before and after calling a display list.
908 void (*BeginCallList
)( struct gl_context
*ctx
,
909 struct gl_display_list
*dlist
);
911 * Called by glEndCallList().
913 * \sa dd_function_table::BeginCallList.
915 void (*EndCallList
)( struct gl_context
*ctx
);
919 * \name GL_ARB_sync interfaces
922 struct gl_sync_object
* (*NewSyncObject
)(struct gl_context
*, GLenum
);
923 void (*FenceSync
)(struct gl_context
*, struct gl_sync_object
*, GLenum
, GLbitfield
);
924 void (*DeleteSyncObject
)(struct gl_context
*, struct gl_sync_object
*);
925 void (*CheckSync
)(struct gl_context
*, struct gl_sync_object
*);
926 void (*ClientWaitSync
)(struct gl_context
*, struct gl_sync_object
*,
927 GLbitfield
, GLuint64
);
928 void (*ServerWaitSync
)(struct gl_context
*, struct gl_sync_object
*,
929 GLbitfield
, GLuint64
);
932 /** GL_NV_conditional_render */
933 void (*BeginConditionalRender
)(struct gl_context
*ctx
, struct gl_query_object
*q
,
935 void (*EndConditionalRender
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
938 * \name GL_OES_draw_texture interface
941 void (*DrawTex
)(struct gl_context
*ctx
, GLfloat x
, GLfloat y
, GLfloat z
,
942 GLfloat width
, GLfloat height
);
946 * \name GL_OES_EGL_image interface
948 void (*EGLImageTargetTexture2D
)(struct gl_context
*ctx
, GLenum target
,
949 struct gl_texture_object
*texObj
,
950 struct gl_texture_image
*texImage
,
951 GLeglImageOES image_handle
);
952 void (*EGLImageTargetRenderbufferStorage
)(struct gl_context
*ctx
,
953 struct gl_renderbuffer
*rb
,
957 * \name GL_EXT_transform_feedback interface
959 struct gl_transform_feedback_object
*
960 (*NewTransformFeedback
)(struct gl_context
*ctx
, GLuint name
);
961 void (*DeleteTransformFeedback
)(struct gl_context
*ctx
,
962 struct gl_transform_feedback_object
*obj
);
963 void (*BeginTransformFeedback
)(struct gl_context
*ctx
, GLenum mode
,
964 struct gl_transform_feedback_object
*obj
);
965 void (*EndTransformFeedback
)(struct gl_context
*ctx
,
966 struct gl_transform_feedback_object
*obj
);
967 void (*PauseTransformFeedback
)(struct gl_context
*ctx
,
968 struct gl_transform_feedback_object
*obj
);
969 void (*ResumeTransformFeedback
)(struct gl_context
*ctx
,
970 struct gl_transform_feedback_object
*obj
);
971 void (*DrawTransformFeedback
)(struct gl_context
*ctx
, GLenum mode
,
972 struct gl_transform_feedback_object
*obj
);
975 * \name GL_NV_texture_barrier interface
977 void (*TextureBarrier
)(struct gl_context
*ctx
);
980 * \name GL_ARB_sampler_objects
982 struct gl_sampler_object
* (*NewSamplerObject
)(struct gl_context
*ctx
,
984 void (*DeleteSamplerObject
)(struct gl_context
*ctx
,
985 struct gl_sampler_object
*samp
);
990 * Transform/Clip/Lighting interface
992 * Drivers present a reduced set of the functions possible in
993 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
994 * remaining functions to map down to these entry points.
996 * These are the initial values to be installed into dispatch by
997 * mesa. If the T&L driver wants to modify the dispatch table
998 * while installed, it must do so itself. It would be possible for
999 * the vertexformat to install its own initial values for these
1000 * functions, but this way there is an obvious list of what is
1001 * expected of the driver.
1003 * If the driver wants to hook in entry points other than those
1004 * listed, it must restore them to their original values in
1005 * the disable() callback, below.
1012 void (GLAPIENTRYP ArrayElement
)( GLint
);
1013 void (GLAPIENTRYP Color3f
)( GLfloat
, GLfloat
, GLfloat
);
1014 void (GLAPIENTRYP Color3fv
)( const GLfloat
* );
1015 void (GLAPIENTRYP Color4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1016 void (GLAPIENTRYP Color4fv
)( const GLfloat
* );
1017 void (GLAPIENTRYP EdgeFlag
)( GLboolean
);
1018 void (GLAPIENTRYP EvalCoord1f
)( GLfloat
);
1019 void (GLAPIENTRYP EvalCoord1fv
)( const GLfloat
* );
1020 void (GLAPIENTRYP EvalCoord2f
)( GLfloat
, GLfloat
);
1021 void (GLAPIENTRYP EvalCoord2fv
)( const GLfloat
* );
1022 void (GLAPIENTRYP EvalPoint1
)( GLint
);
1023 void (GLAPIENTRYP EvalPoint2
)( GLint
, GLint
);
1024 void (GLAPIENTRYP FogCoordfEXT
)( GLfloat
);
1025 void (GLAPIENTRYP FogCoordfvEXT
)( const GLfloat
* );
1026 void (GLAPIENTRYP Indexf
)( GLfloat
);
1027 void (GLAPIENTRYP Indexfv
)( const GLfloat
* );
1028 void (GLAPIENTRYP Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
* );
1029 void (GLAPIENTRYP MultiTexCoord1fARB
)( GLenum
, GLfloat
);
1030 void (GLAPIENTRYP MultiTexCoord1fvARB
)( GLenum
, const GLfloat
* );
1031 void (GLAPIENTRYP MultiTexCoord2fARB
)( GLenum
, GLfloat
, GLfloat
);
1032 void (GLAPIENTRYP MultiTexCoord2fvARB
)( GLenum
, const GLfloat
* );
1033 void (GLAPIENTRYP MultiTexCoord3fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
);
1034 void (GLAPIENTRYP MultiTexCoord3fvARB
)( GLenum
, const GLfloat
* );
1035 void (GLAPIENTRYP MultiTexCoord4fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1036 void (GLAPIENTRYP MultiTexCoord4fvARB
)( GLenum
, const GLfloat
* );
1037 void (GLAPIENTRYP Normal3f
)( GLfloat
, GLfloat
, GLfloat
);
1038 void (GLAPIENTRYP Normal3fv
)( const GLfloat
* );
1039 void (GLAPIENTRYP SecondaryColor3fEXT
)( GLfloat
, GLfloat
, GLfloat
);
1040 void (GLAPIENTRYP SecondaryColor3fvEXT
)( const GLfloat
* );
1041 void (GLAPIENTRYP TexCoord1f
)( GLfloat
);
1042 void (GLAPIENTRYP TexCoord1fv
)( const GLfloat
* );
1043 void (GLAPIENTRYP TexCoord2f
)( GLfloat
, GLfloat
);
1044 void (GLAPIENTRYP TexCoord2fv
)( const GLfloat
* );
1045 void (GLAPIENTRYP TexCoord3f
)( GLfloat
, GLfloat
, GLfloat
);
1046 void (GLAPIENTRYP TexCoord3fv
)( const GLfloat
* );
1047 void (GLAPIENTRYP TexCoord4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1048 void (GLAPIENTRYP TexCoord4fv
)( const GLfloat
* );
1049 void (GLAPIENTRYP Vertex2f
)( GLfloat
, GLfloat
);
1050 void (GLAPIENTRYP Vertex2fv
)( const GLfloat
* );
1051 void (GLAPIENTRYP Vertex3f
)( GLfloat
, GLfloat
, GLfloat
);
1052 void (GLAPIENTRYP Vertex3fv
)( const GLfloat
* );
1053 void (GLAPIENTRYP Vertex4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1054 void (GLAPIENTRYP Vertex4fv
)( const GLfloat
* );
1055 void (GLAPIENTRYP CallList
)( GLuint
);
1056 void (GLAPIENTRYP CallLists
)( GLsizei
, GLenum
, const GLvoid
* );
1057 void (GLAPIENTRYP Begin
)( GLenum
);
1058 void (GLAPIENTRYP End
)( void );
1059 void (GLAPIENTRYP PrimitiveRestartNV
)( void );
1060 /* GL_NV_vertex_program */
1061 void (GLAPIENTRYP VertexAttrib1fNV
)( GLuint index
, GLfloat x
);
1062 void (GLAPIENTRYP VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
);
1063 void (GLAPIENTRYP VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
);
1064 void (GLAPIENTRYP VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
);
1065 void (GLAPIENTRYP VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1066 void (GLAPIENTRYP VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
);
1067 void (GLAPIENTRYP VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1068 void (GLAPIENTRYP VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
);
1069 /* GL_ARB_vertex_program */
1070 void (GLAPIENTRYP VertexAttrib1fARB
)( GLuint index
, GLfloat x
);
1071 void (GLAPIENTRYP VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
);
1072 void (GLAPIENTRYP VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
);
1073 void (GLAPIENTRYP VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
);
1074 void (GLAPIENTRYP VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1075 void (GLAPIENTRYP VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
);
1076 void (GLAPIENTRYP VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1077 void (GLAPIENTRYP VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
);
1079 /* GL_EXT_gpu_shader4 / GL 3.0 */
1080 void (GLAPIENTRYP VertexAttribI1i
)( GLuint index
, GLint x
);
1081 void (GLAPIENTRYP VertexAttribI2i
)( GLuint index
, GLint x
, GLint y
);
1082 void (GLAPIENTRYP VertexAttribI3i
)( GLuint index
, GLint x
, GLint y
, GLint z
);
1083 void (GLAPIENTRYP VertexAttribI4i
)( GLuint index
, GLint x
, GLint y
, GLint z
, GLint w
);
1084 void (GLAPIENTRYP VertexAttribI2iv
)( GLuint index
, const GLint
*v
);
1085 void (GLAPIENTRYP VertexAttribI3iv
)( GLuint index
, const GLint
*v
);
1086 void (GLAPIENTRYP VertexAttribI4iv
)( GLuint index
, const GLint
*v
);
1088 void (GLAPIENTRYP VertexAttribI1ui
)( GLuint index
, GLuint x
);
1089 void (GLAPIENTRYP VertexAttribI2ui
)( GLuint index
, GLuint x
, GLuint y
);
1090 void (GLAPIENTRYP VertexAttribI3ui
)( GLuint index
, GLuint x
, GLuint y
, GLuint z
);
1091 void (GLAPIENTRYP VertexAttribI4ui
)( GLuint index
, GLuint x
, GLuint y
, GLuint z
, GLuint w
);
1092 void (GLAPIENTRYP VertexAttribI2uiv
)( GLuint index
, const GLuint
*v
);
1093 void (GLAPIENTRYP VertexAttribI3uiv
)( GLuint index
, const GLuint
*v
);
1094 void (GLAPIENTRYP VertexAttribI4uiv
)( GLuint index
, const GLuint
*v
);
1098 void (GLAPIENTRYP Rectf
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1104 void (GLAPIENTRYP DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
);
1105 void (GLAPIENTRYP DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
1106 const GLvoid
*indices
);
1107 void (GLAPIENTRYP DrawRangeElements
)( GLenum mode
, GLuint start
,
1108 GLuint end
, GLsizei count
,
1109 GLenum type
, const GLvoid
*indices
);
1110 void (GLAPIENTRYP MultiDrawElementsEXT
)( GLenum mode
, const GLsizei
*count
,
1112 const GLvoid
**indices
,
1114 void (GLAPIENTRYP DrawElementsBaseVertex
)( GLenum mode
, GLsizei count
,
1116 const GLvoid
*indices
,
1118 void (GLAPIENTRYP DrawRangeElementsBaseVertex
)( GLenum mode
, GLuint start
,
1119 GLuint end
, GLsizei count
,
1121 const GLvoid
*indices
,
1123 void (GLAPIENTRYP MultiDrawElementsBaseVertex
)( GLenum mode
,
1124 const GLsizei
*count
,
1126 const GLvoid
**indices
,
1128 const GLint
*basevertex
);
1129 void (GLAPIENTRYP DrawArraysInstanced
)(GLenum mode
, GLint first
,
1130 GLsizei count
, GLsizei primcount
);
1131 void (GLAPIENTRYP DrawElementsInstanced
)(GLenum mode
, GLsizei count
,
1132 GLenum type
, const GLvoid
*indices
,
1134 void (GLAPIENTRYP DrawElementsInstancedBaseVertex
)(GLenum mode
, GLsizei count
,
1135 GLenum type
, const GLvoid
*indices
,
1136 GLsizei primcount
, GLint basevertex
);
1142 * If you don't support eval, fallback to the default vertex format
1143 * on receiving an eval call and use the pipeline mechanism to
1144 * provide partial T&L acceleration.
1146 * Mesa will provide a set of helper functions to do eval within
1147 * accelerated vertex formats, eventually...
1150 void (GLAPIENTRYP EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
);
1151 void (GLAPIENTRYP EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
, GLint j1
, GLint j2
);
1157 #endif /* DD_INCLUDED */