8a20a6636324922990fde4d7dabd9897125e4a0b
[mesa.git] / src / mesa / main / dd.h
1 /**
2 * \file dd.h
3 * Device driver interfaces.
4 */
5
6 /*
7 * Mesa 3-D graphics library
8 * Version: 6.5.2
9 *
10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
11 *
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:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
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.
28 */
29
30
31 #ifndef DD_INCLUDED
32 #define DD_INCLUDED
33
34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
35
36 struct gl_pixelstore_attrib;
37 struct gl_display_list;
38
39 /* GL_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.
42 *
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
45 * at this point.
46 *
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.
50 */
51 #define MESA_MAP_NOWAIT_BIT 0x0040
52
53
54 /**
55 * Device driver function table.
56 * Core Mesa uses these function pointers to call into device drivers.
57 * Most of these functions directly correspond to OpenGL state commands.
58 * Core Mesa will call these functions after error checking has been done
59 * so that the drivers don't have to worry about error testing.
60 *
61 * Vertex transformation/clipping/lighting is patched into the T&L module.
62 * Rasterization functions are patched into the swrast module.
63 *
64 * Note: when new functions are added here, the drivers/common/driverfuncs.c
65 * file should be updated too!!!
66 */
67 struct dd_function_table {
68 /**
69 * Return a string as needed by glGetString().
70 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
71 * returned.
72 */
73 const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
74
75 /**
76 * Notify the driver after Mesa has made some internal state changes.
77 *
78 * This is in addition to any state change callbacks Mesa may already have
79 * made.
80 */
81 void (*UpdateState)( GLcontext *ctx, GLbitfield new_state );
82
83 /**
84 * Get the width and height of the named buffer/window.
85 *
86 * Mesa uses this to determine when the driver's window size has changed.
87 * XXX OBSOLETE: this function will be removed in the future.
88 */
89 void (*GetBufferSize)( GLframebuffer *buffer,
90 GLuint *width, GLuint *height );
91
92 /**
93 * Resize the given framebuffer to the given size.
94 * XXX OBSOLETE: this function will be removed in the future.
95 */
96 void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb,
97 GLuint width, GLuint height);
98
99 /**
100 * Called whenever an error is generated.
101 * __GLcontextRec::ErrorValue contains the error value.
102 */
103 void (*Error)( GLcontext *ctx );
104
105 /**
106 * This is called whenever glFinish() is called.
107 */
108 void (*Finish)( GLcontext *ctx );
109
110 /**
111 * This is called whenever glFlush() is called.
112 */
113 void (*Flush)( GLcontext *ctx );
114
115 /**
116 * Clear the color/depth/stencil/accum buffer(s).
117 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
118 * renderbuffers need to be cleared.
119 */
120 void (*Clear)( GLcontext *ctx, GLbitfield buffers );
121
122 /**
123 * Execute glAccum command.
124 */
125 void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
126
127
128 /**
129 * Execute glRasterPos, updating the ctx->Current.Raster fields
130 */
131 void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] );
132
133 /**
134 * \name Image-related functions
135 */
136 /*@{*/
137
138 /**
139 * Called by glDrawPixels().
140 * \p unpack describes how to unpack the source image data.
141 */
142 void (*DrawPixels)( GLcontext *ctx,
143 GLint x, GLint y, GLsizei width, GLsizei height,
144 GLenum format, GLenum type,
145 const struct gl_pixelstore_attrib *unpack,
146 const GLvoid *pixels );
147
148 /**
149 * Called by glReadPixels().
150 */
151 void (*ReadPixels)( GLcontext *ctx,
152 GLint x, GLint y, GLsizei width, GLsizei height,
153 GLenum format, GLenum type,
154 const struct gl_pixelstore_attrib *unpack,
155 GLvoid *dest );
156
157 /**
158 * Called by glCopyPixels().
159 */
160 void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy,
161 GLsizei width, GLsizei height,
162 GLint dstx, GLint dsty, GLenum type );
163
164 /**
165 * Called by glBitmap().
166 */
167 void (*Bitmap)( GLcontext *ctx,
168 GLint x, GLint y, GLsizei width, GLsizei height,
169 const struct gl_pixelstore_attrib *unpack,
170 const GLubyte *bitmap );
171 /*@}*/
172
173
174 /**
175 * \name Texture image functions
176 */
177 /*@{*/
178
179 /**
180 * Choose texture format.
181 *
182 * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
183 * functions. The driver should examine \p internalFormat and return a
184 * gl_format value.
185 */
186 GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
187 GLenum srcFormat, GLenum srcType );
188
189 /**
190 * Called by glTexImage1D().
191 *
192 * \param target user specified.
193 * \param format user specified.
194 * \param type user specified.
195 * \param pixels user specified.
196 * \param packing indicates the image packing of pixels.
197 * \param texObj is the target texture object.
198 * \param texImage is the target texture image. It will have the texture \p
199 * width, \p height, \p depth, \p border and \p internalFormat information.
200 *
201 * \p retainInternalCopy is returned by this function and indicates whether
202 * core Mesa should keep an internal copy of the texture image.
203 *
204 * Drivers should call a fallback routine from texstore.c if needed.
205 */
206 void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level,
207 GLint internalFormat,
208 GLint width, GLint border,
209 GLenum format, GLenum type, const GLvoid *pixels,
210 const struct gl_pixelstore_attrib *packing,
211 struct gl_texture_object *texObj,
212 struct gl_texture_image *texImage );
213
214 /**
215 * Called by glTexImage2D().
216 *
217 * \sa dd_function_table::TexImage1D.
218 */
219 void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level,
220 GLint internalFormat,
221 GLint width, GLint height, GLint border,
222 GLenum format, GLenum type, const GLvoid *pixels,
223 const struct gl_pixelstore_attrib *packing,
224 struct gl_texture_object *texObj,
225 struct gl_texture_image *texImage );
226
227 /**
228 * Called by glTexImage3D().
229 *
230 * \sa dd_function_table::TexImage1D.
231 */
232 void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level,
233 GLint internalFormat,
234 GLint width, GLint height, GLint depth, GLint border,
235 GLenum format, GLenum type, const GLvoid *pixels,
236 const struct gl_pixelstore_attrib *packing,
237 struct gl_texture_object *texObj,
238 struct gl_texture_image *texImage );
239
240 /**
241 * Called by glTexSubImage1D().
242 *
243 * \param target user specified.
244 * \param level user specified.
245 * \param xoffset user specified.
246 * \param yoffset user specified.
247 * \param zoffset user specified.
248 * \param width user specified.
249 * \param height user specified.
250 * \param depth user specified.
251 * \param format user specified.
252 * \param type user specified.
253 * \param pixels user specified.
254 * \param packing indicates the image packing of pixels.
255 * \param texObj is the target texture object.
256 * \param texImage is the target texture image. It will have the texture \p
257 * width, \p height, \p border and \p internalFormat information.
258 *
259 * The driver should use a fallback routine from texstore.c if needed.
260 */
261 void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
262 GLint xoffset, GLsizei width,
263 GLenum format, GLenum type,
264 const GLvoid *pixels,
265 const struct gl_pixelstore_attrib *packing,
266 struct gl_texture_object *texObj,
267 struct gl_texture_image *texImage );
268
269 /**
270 * Called by glTexSubImage2D().
271 *
272 * \sa dd_function_table::TexSubImage1D.
273 */
274 void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
275 GLint xoffset, GLint yoffset,
276 GLsizei width, GLsizei height,
277 GLenum format, GLenum type,
278 const GLvoid *pixels,
279 const struct gl_pixelstore_attrib *packing,
280 struct gl_texture_object *texObj,
281 struct gl_texture_image *texImage );
282
283 /**
284 * Called by glTexSubImage3D().
285 *
286 * \sa dd_function_table::TexSubImage1D.
287 */
288 void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
289 GLint xoffset, GLint yoffset, GLint zoffset,
290 GLsizei width, GLsizei height, GLint depth,
291 GLenum format, GLenum type,
292 const GLvoid *pixels,
293 const struct gl_pixelstore_attrib *packing,
294 struct gl_texture_object *texObj,
295 struct gl_texture_image *texImage );
296
297 /**
298 * Called by glGetTexImage().
299 */
300 void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level,
301 GLenum format, GLenum type, GLvoid *pixels,
302 struct gl_texture_object *texObj,
303 struct gl_texture_image *texImage );
304
305 /**
306 * Called by glCopyTexImage1D().
307 *
308 * Drivers should use a fallback routine from texstore.c if needed.
309 */
310 void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level,
311 GLenum internalFormat, GLint x, GLint y,
312 GLsizei width, GLint border );
313
314 /**
315 * Called by glCopyTexImage2D().
316 *
317 * Drivers should use a fallback routine from texstore.c if needed.
318 */
319 void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level,
320 GLenum internalFormat, GLint x, GLint y,
321 GLsizei width, GLsizei height, GLint border );
322
323 /**
324 * Called by glCopyTexSubImage1D().
325 *
326 * Drivers should use a fallback routine from texstore.c if needed.
327 */
328 void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
329 GLint xoffset,
330 GLint x, GLint y, GLsizei width );
331 /**
332 * Called by glCopyTexSubImage2D().
333 *
334 * Drivers should use a fallback routine from texstore.c if needed.
335 */
336 void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
337 GLint xoffset, GLint yoffset,
338 GLint x, GLint y,
339 GLsizei width, GLsizei height );
340 /**
341 * Called by glCopyTexSubImage3D().
342 *
343 * Drivers should use a fallback routine from texstore.c if needed.
344 */
345 void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
346 GLint xoffset, GLint yoffset, GLint zoffset,
347 GLint x, GLint y,
348 GLsizei width, GLsizei height );
349
350 /**
351 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
352 */
353 void (*GenerateMipmap)(GLcontext *ctx, GLenum target,
354 struct gl_texture_object *texObj);
355
356 /**
357 * Called by glTexImage[123]D when user specifies a proxy texture
358 * target.
359 *
360 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
361 */
362 GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target,
363 GLint level, GLint internalFormat,
364 GLenum format, GLenum type,
365 GLint width, GLint height,
366 GLint depth, GLint border);
367 /*@}*/
368
369
370 /**
371 * \name Compressed texture functions
372 */
373 /*@{*/
374
375 /**
376 * Called by glCompressedTexImage1D().
377 *
378 * \param target user specified.
379 * \param format user specified.
380 * \param type user specified.
381 * \param pixels user specified.
382 * \param packing indicates the image packing of pixels.
383 * \param texObj is the target texture object.
384 * \param texImage is the target texture image. It will have the texture \p
385 * width, \p height, \p depth, \p border and \p internalFormat information.
386 *
387 * \a retainInternalCopy is returned by this function and indicates whether
388 * core Mesa should keep an internal copy of the texture image.
389 */
390 void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
391 GLint level, GLint internalFormat,
392 GLsizei width, GLint border,
393 GLsizei imageSize, const GLvoid *data,
394 struct gl_texture_object *texObj,
395 struct gl_texture_image *texImage );
396 /**
397 * Called by glCompressedTexImage2D().
398 *
399 * \sa dd_function_table::CompressedTexImage1D.
400 */
401 void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
402 GLint level, GLint internalFormat,
403 GLsizei width, GLsizei height, GLint border,
404 GLsizei imageSize, const GLvoid *data,
405 struct gl_texture_object *texObj,
406 struct gl_texture_image *texImage );
407 /**
408 * Called by glCompressedTexImage3D().
409 *
410 * \sa dd_function_table::CompressedTexImage3D.
411 */
412 void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
413 GLint level, GLint internalFormat,
414 GLsizei width, GLsizei height, GLsizei depth,
415 GLint border,
416 GLsizei imageSize, const GLvoid *data,
417 struct gl_texture_object *texObj,
418 struct gl_texture_image *texImage );
419
420 /**
421 * Called by glCompressedTexSubImage1D().
422 *
423 * \param target user specified.
424 * \param level user specified.
425 * \param xoffset user specified.
426 * \param yoffset user specified.
427 * \param zoffset user specified.
428 * \param width user specified.
429 * \param height user specified.
430 * \param depth user specified.
431 * \param imageSize user specified.
432 * \param data user specified.
433 * \param texObj is the target texture object.
434 * \param texImage is the target texture image. It will have the texture \p
435 * width, \p height, \p depth, \p border and \p internalFormat information.
436 */
437 void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level,
438 GLint xoffset, GLsizei width,
439 GLenum format,
440 GLsizei imageSize, const GLvoid *data,
441 struct gl_texture_object *texObj,
442 struct gl_texture_image *texImage);
443 /**
444 * Called by glCompressedTexSubImage2D().
445 *
446 * \sa dd_function_table::CompressedTexImage3D.
447 */
448 void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level,
449 GLint xoffset, GLint yoffset,
450 GLsizei width, GLint height,
451 GLenum format,
452 GLsizei imageSize, const GLvoid *data,
453 struct gl_texture_object *texObj,
454 struct gl_texture_image *texImage);
455 /**
456 * Called by glCompressedTexSubImage3D().
457 *
458 * \sa dd_function_table::CompressedTexImage3D.
459 */
460 void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level,
461 GLint xoffset, GLint yoffset, GLint zoffset,
462 GLsizei width, GLint height, GLint depth,
463 GLenum format,
464 GLsizei imageSize, const GLvoid *data,
465 struct gl_texture_object *texObj,
466 struct gl_texture_image *texImage);
467
468
469 /**
470 * Called by glGetCompressedTexImage.
471 */
472 void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level,
473 GLvoid *img,
474 struct gl_texture_object *texObj,
475 struct gl_texture_image *texImage);
476
477 /*@}*/
478
479 /**
480 * \name Texture object functions
481 */
482 /*@{*/
483
484 /**
485 * Called by glBindTexture().
486 */
487 void (*BindTexture)( GLcontext *ctx, GLenum target,
488 struct gl_texture_object *tObj );
489
490 /**
491 * Called to allocate a new texture object.
492 * A new gl_texture_object should be returned. The driver should
493 * attach to it any device-specific info it needs.
494 */
495 struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name,
496 GLenum target );
497 /**
498 * Called when a texture object is about to be deallocated.
499 *
500 * Driver should delete the gl_texture_object object and anything
501 * hanging off of it.
502 */
503 void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
504
505 /**
506 * Called to allocate a new texture image object.
507 */
508 struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx );
509
510 /**
511 * Called to free tImage->Data.
512 */
513 void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
514
515 /** Map texture image data into user space */
516 void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
517 /** Unmap texture images from user space */
518 void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
519
520 /**
521 * Note: no context argument. This function doesn't initially look
522 * like it belongs here, except that the driver is the only entity
523 * that knows for sure how the texture memory is allocated - via
524 * the above callbacks. There is then an argument that the driver
525 * knows what memcpy paths might be fast. Typically this is invoked with
526 *
527 * to -- a pointer into texture memory allocated by NewTextureImage() above.
528 * from -- a pointer into client memory or a mesa temporary.
529 * sz -- nr bytes to copy.
530 */
531 void* (*TextureMemCpy)( void *to, const void *from, size_t sz );
532
533 /**
534 * Called by glAreTextureResident().
535 */
536 GLboolean (*IsTextureResident)( GLcontext *ctx,
537 struct gl_texture_object *t );
538
539 /**
540 * Called when the texture's color lookup table is changed.
541 *
542 * If \p tObj is NULL then the shared texture palette
543 * gl_texture_object::Palette is to be updated.
544 */
545 void (*UpdateTexturePalette)( GLcontext *ctx,
546 struct gl_texture_object *tObj );
547 /*@}*/
548
549
550 /**
551 * \name Imaging functionality
552 */
553 /*@{*/
554 void (*CopyColorTable)( GLcontext *ctx,
555 GLenum target, GLenum internalformat,
556 GLint x, GLint y, GLsizei width );
557
558 void (*CopyColorSubTable)( GLcontext *ctx,
559 GLenum target, GLsizei start,
560 GLint x, GLint y, GLsizei width );
561
562 void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target,
563 GLenum internalFormat,
564 GLint x, GLint y, GLsizei width );
565
566 void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target,
567 GLenum internalFormat,
568 GLint x, GLint y,
569 GLsizei width, GLsizei height );
570 /*@}*/
571
572
573 /**
574 * \name Vertex/fragment program functions
575 */
576 /*@{*/
577 /** Bind a vertex/fragment program */
578 void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog);
579 /** Allocate a new program */
580 struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id);
581 /** Delete a program */
582 void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog);
583 /**
584 * Notify driver that a program string (and GPU code) has been specified
585 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
586 * supported by the driver.
587 */
588 GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
589 struct gl_program *prog);
590
591 /** Query if program can be loaded onto hardware */
592 GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target,
593 struct gl_program *prog);
594
595 /*@}*/
596
597 /**
598 * \name GLSL shader/program functions.
599 */
600 /*@{*/
601 /**
602 * Called when a shader is compiled.
603 *
604 * Note that not all shader objects get ShaderCompile called on
605 * them. Notably, the shaders containing builtin functions do not
606 * have CompileShader() called, so if lowering passes are done they
607 * need to also be performed in LinkShader().
608 */
609 GLboolean (*CompileShader)(GLcontext *ctx, struct gl_shader *shader);
610 /**
611 * Called when a shader program is linked.
612 *
613 * This gives drivers an opportunity to clone the IR and make their
614 * own transformations on it for the purposes of code generation.
615 */
616 GLboolean (*LinkShader)(GLcontext *ctx, struct gl_shader_program *shader);
617 /*@}*/
618
619 /**
620 * \name State-changing functions.
621 *
622 * \note drawing functions are above.
623 *
624 * These functions are called by their corresponding OpenGL API functions.
625 * They are \e also called by the gl_PopAttrib() function!!!
626 * May add more functions like these to the device driver in the future.
627 */
628 /*@{*/
629 /** Specify the alpha test function */
630 void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref);
631 /** Set the blend color */
632 void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]);
633 /** Set the blend equation */
634 void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA);
635 /** Specify pixel arithmetic */
636 void (*BlendFuncSeparate)(GLcontext *ctx,
637 GLenum sfactorRGB, GLenum dfactorRGB,
638 GLenum sfactorA, GLenum dfactorA);
639 /** Specify clear values for the color buffers */
640 void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]);
641 /** Specify the clear value for the depth buffer */
642 void (*ClearDepth)(GLcontext *ctx, GLclampd d);
643 /** Specify the clear value for the stencil buffer */
644 void (*ClearStencil)(GLcontext *ctx, GLint s);
645 /** Specify a plane against which all geometry is clipped */
646 void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation );
647 /** Enable and disable writing of frame buffer color components */
648 void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask,
649 GLboolean bmask, GLboolean amask );
650 void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask,
651 GLboolean gmask, GLboolean bmask, GLboolean amask);
652 /** Cause a material color to track the current color */
653 void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode);
654 /** Specify whether front- or back-facing facets can be culled */
655 void (*CullFace)(GLcontext *ctx, GLenum mode);
656 /** Define front- and back-facing polygons */
657 void (*FrontFace)(GLcontext *ctx, GLenum mode);
658 /** Specify the value used for depth buffer comparisons */
659 void (*DepthFunc)(GLcontext *ctx, GLenum func);
660 /** Enable or disable writing into the depth buffer */
661 void (*DepthMask)(GLcontext *ctx, GLboolean flag);
662 /** Specify mapping of depth values from NDC to window coordinates */
663 void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval);
664 /** Specify the current buffer for writing */
665 void (*DrawBuffer)( GLcontext *ctx, GLenum buffer );
666 /** Specify the buffers for writing for fragment programs*/
667 void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers );
668 /** Enable or disable server-side gl capabilities */
669 void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state);
670 /** Specify fog parameters */
671 void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
672 /** Specify implementation-specific hints */
673 void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
674 /** Set light source parameters.
675 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
676 * been transformed to eye-space.
677 */
678 void (*Lightfv)(GLcontext *ctx, GLenum light,
679 GLenum pname, const GLfloat *params );
680 /** Set the lighting model parameters */
681 void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
682 /** Specify the line stipple pattern */
683 void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern );
684 /** Specify the width of rasterized lines */
685 void (*LineWidth)(GLcontext *ctx, GLfloat width);
686 /** Specify a logical pixel operation for color index rendering */
687 void (*LogicOpcode)(GLcontext *ctx, GLenum opcode);
688 void (*PointParameterfv)(GLcontext *ctx, GLenum pname,
689 const GLfloat *params);
690 /** Specify the diameter of rasterized points */
691 void (*PointSize)(GLcontext *ctx, GLfloat size);
692 /** Select a polygon rasterization mode */
693 void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
694 /** Set the scale and units used to calculate depth values */
695 void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units);
696 /** Set the polygon stippling pattern */
697 void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
698 /* Specifies the current buffer for reading */
699 void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
700 /** Set rasterization mode */
701 void (*RenderMode)(GLcontext *ctx, GLenum mode );
702 /** Define the scissor box */
703 void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
704 /** Select flat or smooth shading */
705 void (*ShadeModel)(GLcontext *ctx, GLenum mode);
706 /** OpenGL 2.0 two-sided StencilFunc */
707 void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func,
708 GLint ref, GLuint mask);
709 /** OpenGL 2.0 two-sided StencilMask */
710 void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask);
711 /** OpenGL 2.0 two-sided StencilOp */
712 void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail,
713 GLenum zfail, GLenum zpass);
714 /** Control the generation of texture coordinates */
715 void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname,
716 const GLfloat *params);
717 /** Set texture environment parameters */
718 void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname,
719 const GLfloat *param);
720 /** Set texture parameters */
721 void (*TexParameter)(GLcontext *ctx, GLenum target,
722 struct gl_texture_object *texObj,
723 GLenum pname, const GLfloat *params);
724 /** Set the viewport */
725 void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
726 /*@}*/
727
728
729 /**
730 * \name Vertex/pixel buffer object functions
731 */
732 /*@{*/
733 void (*BindBuffer)( GLcontext *ctx, GLenum target,
734 struct gl_buffer_object *obj );
735
736 struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer,
737 GLenum target );
738
739 void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj );
740
741 GLboolean (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
742 const GLvoid *data, GLenum usage,
743 struct gl_buffer_object *obj );
744
745 void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset,
746 GLsizeiptrARB size, const GLvoid *data,
747 struct gl_buffer_object *obj );
748
749 void (*GetBufferSubData)( GLcontext *ctx, GLenum target,
750 GLintptrARB offset, GLsizeiptrARB size,
751 GLvoid *data, struct gl_buffer_object *obj );
752
753 void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access,
754 struct gl_buffer_object *obj );
755
756 void (*CopyBufferSubData)( GLcontext *ctx,
757 struct gl_buffer_object *src,
758 struct gl_buffer_object *dst,
759 GLintptr readOffset, GLintptr writeOffset,
760 GLsizeiptr size );
761
762 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
763 */
764 void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset,
765 GLsizeiptr length, GLbitfield access,
766 struct gl_buffer_object *obj);
767
768 void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target,
769 GLintptr offset, GLsizeiptr length,
770 struct gl_buffer_object *obj);
771
772 GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target,
773 struct gl_buffer_object *obj );
774 /*@}*/
775
776 /**
777 * \name Functions for GL_APPLE_object_purgeable
778 */
779 /*@{*/
780 /* variations on ObjectPurgeable */
781 GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
782 GLenum (*RenderObjectPurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
783 GLenum (*TextureObjectPurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
784
785 /* variations on ObjectUnpurgeable */
786 GLenum (*BufferObjectUnpurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
787 GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
788 GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
789 /*@}*/
790
791 /**
792 * \name Functions for GL_EXT_framebuffer_{object,blit}.
793 */
794 /*@{*/
795 struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
796 struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
797 void (*BindFramebuffer)(GLcontext *ctx, GLenum target,
798 struct gl_framebuffer *drawFb,
799 struct gl_framebuffer *readFb);
800 void (*FramebufferRenderbuffer)(GLcontext *ctx,
801 struct gl_framebuffer *fb,
802 GLenum attachment,
803 struct gl_renderbuffer *rb);
804 void (*RenderTexture)(GLcontext *ctx,
805 struct gl_framebuffer *fb,
806 struct gl_renderbuffer_attachment *att);
807 void (*FinishRenderTexture)(GLcontext *ctx,
808 struct gl_renderbuffer_attachment *att);
809 void (*ValidateFramebuffer)(GLcontext *ctx,
810 struct gl_framebuffer *fb);
811 /*@}*/
812 void (*BlitFramebuffer)(GLcontext *ctx,
813 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
814 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
815 GLbitfield mask, GLenum filter);
816
817 /**
818 * \name Query objects
819 */
820 /*@{*/
821 struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id);
822 void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q);
823 void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q);
824 void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q);
825 void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q);
826 void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q);
827 /*@}*/
828
829
830 /**
831 * \name Vertex Array objects
832 */
833 /*@{*/
834 struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id);
835 void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
836 void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
837 /*@}*/
838
839 /**
840 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
841 */
842 /*@{*/
843 struct gl_shader *(*NewShader)(GLcontext *ctx, GLuint name, GLenum type);
844 void (*DeleteShader)(GLcontext *ctx, struct gl_shader *shader);
845 struct gl_shader_program *(*NewShaderProgram)(GLcontext *ctx, GLuint name);
846 void (*DeleteShaderProgram)(GLcontext *ctx,
847 struct gl_shader_program *shProg);
848 void (*UseProgram)(GLcontext *ctx, struct gl_shader_program *shProg);
849 /*@}*/
850
851
852 /**
853 * \name Support for multiple T&L engines
854 */
855 /*@{*/
856
857 /**
858 * Bitmask of state changes that require the current T&L module to be
859 * validated, using ValidateTnlModule() below.
860 */
861 GLuint NeedValidate;
862
863 /**
864 * Validate the current T&L module.
865 *
866 * This is called directly after UpdateState() when a state change that has
867 * occurred matches the dd_function_table::NeedValidate bitmask above. This
868 * ensures all computed values are up to date, thus allowing the driver to
869 * decide if the current T&L module needs to be swapped out.
870 *
871 * This must be non-NULL if a driver installs a custom T&L module and sets
872 * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
873 */
874 void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
875
876
877 #define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
878 #define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
879 #define PRIM_UNKNOWN (GL_POLYGON+3)
880
881 /**
882 * Set by the driver-supplied T&L engine.
883 *
884 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
885 */
886 GLuint CurrentExecPrimitive;
887
888 /**
889 * Current state of an in-progress compilation.
890 *
891 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
892 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
893 */
894 GLuint CurrentSavePrimitive;
895
896
897 #define FLUSH_STORED_VERTICES 0x1
898 #define FLUSH_UPDATE_CURRENT 0x2
899 /**
900 * Set by the driver-supplied T&L engine whenever vertices are buffered
901 * between glBegin()/glEnd() objects or __GLcontextRec::Current is not
902 * updated.
903 *
904 * The dd_function_table::FlushVertices call below may be used to resolve
905 * these conditions.
906 */
907 GLuint NeedFlush;
908 GLuint SaveNeedFlush;
909
910
911 /* Called prior to any of the GLvertexformat functions being
912 * called. Paired with Driver.FlushVertices().
913 */
914 void (*BeginVertices)( GLcontext *ctx );
915
916 /**
917 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
918 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
919 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
920 * __GLcontextRec::Current and gl_light_attrib::Material
921 *
922 * Note that the default T&L engine never clears the
923 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
924 */
925 void (*FlushVertices)( GLcontext *ctx, GLuint flags );
926 void (*SaveFlushVertices)( GLcontext *ctx );
927
928 /**
929 * Give the driver the opportunity to hook in its own vtxfmt for
930 * compiling optimized display lists. This is called on each valid
931 * glBegin() during list compilation.
932 */
933 GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode );
934
935 /**
936 * Notify driver that the special derived value _NeedEyeCoords has
937 * changed.
938 */
939 void (*LightingSpaceChange)( GLcontext *ctx );
940
941 /**
942 * Called by glNewList().
943 *
944 * Let the T&L component know what is going on with display lists
945 * in time to make changes to dispatch tables, etc.
946 */
947 void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode );
948 /**
949 * Called by glEndList().
950 *
951 * \sa dd_function_table::NewList.
952 */
953 void (*EndList)( GLcontext *ctx );
954
955 /**
956 * Called by glCallList(s).
957 *
958 * Notify the T&L component before and after calling a display list.
959 */
960 void (*BeginCallList)( GLcontext *ctx,
961 struct gl_display_list *dlist );
962 /**
963 * Called by glEndCallList().
964 *
965 * \sa dd_function_table::BeginCallList.
966 */
967 void (*EndCallList)( GLcontext *ctx );
968
969
970 /**
971 * \name GL_ARB_sync interfaces
972 */
973 /*@{*/
974 struct gl_sync_object * (*NewSyncObject)(GLcontext *, GLenum);
975 void (*FenceSync)(GLcontext *, struct gl_sync_object *, GLenum, GLbitfield);
976 void (*DeleteSyncObject)(GLcontext *, struct gl_sync_object *);
977 void (*CheckSync)(GLcontext *, struct gl_sync_object *);
978 void (*ClientWaitSync)(GLcontext *, struct gl_sync_object *,
979 GLbitfield, GLuint64);
980 void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *,
981 GLbitfield, GLuint64);
982 /*@}*/
983
984 /** GL_NV_conditional_render */
985 void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q,
986 GLenum mode);
987 void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q);
988
989 /**
990 * \name GL_OES_draw_texture interface
991 */
992 /*@{*/
993 void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
994 GLfloat width, GLfloat height);
995 /*@}*/
996
997 /**
998 * \name GL_OES_EGL_image interface
999 */
1000 void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target,
1001 struct gl_texture_object *texObj,
1002 struct gl_texture_image *texImage,
1003 GLeglImageOES image_handle);
1004 void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx,
1005 struct gl_renderbuffer *rb,
1006 void *image_handle);
1007
1008 /**
1009 * \name GL_EXT_transform_feedback interface
1010 */
1011 struct gl_transform_feedback_object *
1012 (*NewTransformFeedback)(GLcontext *ctx, GLuint name);
1013 void (*DeleteTransformFeedback)(GLcontext *ctx,
1014 struct gl_transform_feedback_object *obj);
1015 void (*BeginTransformFeedback)(GLcontext *ctx, GLenum mode,
1016 struct gl_transform_feedback_object *obj);
1017 void (*EndTransformFeedback)(GLcontext *ctx,
1018 struct gl_transform_feedback_object *obj);
1019 void (*PauseTransformFeedback)(GLcontext *ctx,
1020 struct gl_transform_feedback_object *obj);
1021 void (*ResumeTransformFeedback)(GLcontext *ctx,
1022 struct gl_transform_feedback_object *obj);
1023 void (*DrawTransformFeedback)(GLcontext *ctx, GLenum mode,
1024 struct gl_transform_feedback_object *obj);
1025 };
1026
1027
1028 /**
1029 * Transform/Clip/Lighting interface
1030 *
1031 * Drivers present a reduced set of the functions possible in
1032 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
1033 * remaining functions to map down to these entry points.
1034 *
1035 * These are the initial values to be installed into dispatch by
1036 * mesa. If the T&L driver wants to modify the dispatch table
1037 * while installed, it must do so itself. It would be possible for
1038 * the vertexformat to install its own initial values for these
1039 * functions, but this way there is an obvious list of what is
1040 * expected of the driver.
1041 *
1042 * If the driver wants to hook in entry points other than those
1043 * listed, it must restore them to their original values in
1044 * the disable() callback, below.
1045 */
1046 typedef struct {
1047 /**
1048 * \name Vertex
1049 */
1050 /*@{*/
1051 void (GLAPIENTRYP ArrayElement)( GLint );
1052 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
1053 void (GLAPIENTRYP Color3fv)( const GLfloat * );
1054 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1055 void (GLAPIENTRYP Color4fv)( const GLfloat * );
1056 void (GLAPIENTRYP EdgeFlag)( GLboolean );
1057 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
1058 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
1059 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
1060 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
1061 void (GLAPIENTRYP EvalPoint1)( GLint );
1062 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
1063 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
1064 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
1065 void (GLAPIENTRYP Indexf)( GLfloat );
1066 void (GLAPIENTRYP Indexfv)( const GLfloat * );
1067 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
1068 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
1069 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
1070 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
1071 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
1072 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
1073 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
1074 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
1075 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
1076 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
1077 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
1078 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
1079 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
1080 void (GLAPIENTRYP TexCoord1f)( GLfloat );
1081 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
1082 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
1083 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
1084 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
1085 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
1086 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1087 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
1088 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
1089 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
1090 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
1091 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
1092 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1093 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
1094 void (GLAPIENTRYP CallList)( GLuint );
1095 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
1096 void (GLAPIENTRYP Begin)( GLenum );
1097 void (GLAPIENTRYP End)( void );
1098 /* GL_NV_vertex_program */
1099 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
1100 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
1101 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
1102 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
1103 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1104 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
1105 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1106 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
1107 /* GL_ARB_vertex_program */
1108 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
1109 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
1110 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
1111 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
1112 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1113 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
1114 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1115 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
1116 /*@}*/
1117
1118 void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
1119
1120 /**
1121 * \name Array
1122 */
1123 /*@{*/
1124 void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
1125 void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
1126 const GLvoid *indices );
1127 void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
1128 GLuint end, GLsizei count,
1129 GLenum type, const GLvoid *indices );
1130 void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count,
1131 GLenum type,
1132 const GLvoid **indices,
1133 GLsizei primcount);
1134 void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
1135 GLenum type,
1136 const GLvoid *indices,
1137 GLint basevertex );
1138 void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
1139 GLuint end, GLsizei count,
1140 GLenum type,
1141 const GLvoid *indices,
1142 GLint basevertex);
1143 void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
1144 const GLsizei *count,
1145 GLenum type,
1146 const GLvoid **indices,
1147 GLsizei primcount,
1148 const GLint *basevertex);
1149 void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first,
1150 GLsizei count, GLsizei primcount);
1151 void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count,
1152 GLenum type, const GLvoid *indices,
1153 GLsizei primcount);
1154 /*@}*/
1155
1156 /**
1157 * \name Eval
1158 *
1159 * If you don't support eval, fallback to the default vertex format
1160 * on receiving an eval call and use the pipeline mechanism to
1161 * provide partial T&L acceleration.
1162 *
1163 * Mesa will provide a set of helper functions to do eval within
1164 * accelerated vertex formats, eventually...
1165 */
1166 /*@{*/
1167 void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
1168 void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1169 /*@}*/
1170
1171 } GLvertexformat;
1172
1173
1174 #endif /* DD_INCLUDED */