mesa: remove unused PRIM_INSIDE_UNKNOWN_PRIM constant
[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 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 * OTHER DEALINGS IN THE SOFTWARE.
29 */
30
31
32 #ifndef DD_INCLUDED
33 #define DD_INCLUDED
34
35 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
36
37 #include "glheader.h"
38
39 struct gl_buffer_object;
40 struct gl_context;
41 struct gl_display_list;
42 struct gl_framebuffer;
43 struct gl_pixelstore_attrib;
44 struct gl_program;
45 struct gl_renderbuffer;
46 struct gl_renderbuffer_attachment;
47 struct gl_shader;
48 struct gl_shader_program;
49 struct gl_texture_image;
50 struct gl_texture_object;
51
52 /* GL_ARB_vertex_buffer_object */
53 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
54 * NULL) if buffer is unavailable for immediate mapping.
55 *
56 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
57 * would require more book-keeping in the driver than seems necessary
58 * at this point.
59 *
60 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
61 * want to provoke the driver to throw away the old storage, we will
62 * respect the contents of already referenced data.
63 */
64 #define MESA_MAP_NOWAIT_BIT 0x0040
65
66
67 /**
68 * Device driver function table.
69 * Core Mesa uses these function pointers to call into device drivers.
70 * Most of these functions directly correspond to OpenGL state commands.
71 * Core Mesa will call these functions after error checking has been done
72 * so that the drivers don't have to worry about error testing.
73 *
74 * Vertex transformation/clipping/lighting is patched into the T&L module.
75 * Rasterization functions are patched into the swrast module.
76 *
77 * Note: when new functions are added here, the drivers/common/driverfuncs.c
78 * file should be updated too!!!
79 */
80 struct dd_function_table {
81 /**
82 * Return a string as needed by glGetString().
83 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
84 * returned.
85 */
86 const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
87
88 /**
89 * Notify the driver after Mesa has made some internal state changes.
90 *
91 * This is in addition to any state change callbacks Mesa may already have
92 * made.
93 */
94 void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
95
96 /**
97 * Get the width and height of the named buffer/window.
98 *
99 * Mesa uses this to determine when the driver's window size has changed.
100 * XXX OBSOLETE: this function will be removed in the future.
101 */
102 void (*GetBufferSize)( struct gl_framebuffer *buffer,
103 GLuint *width, GLuint *height );
104
105 /**
106 * Resize the given framebuffer to the given size.
107 * XXX OBSOLETE: this function will be removed in the future.
108 */
109 void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
110 GLuint width, GLuint height);
111
112 /**
113 * This is called whenever glFinish() is called.
114 */
115 void (*Finish)( struct gl_context *ctx );
116
117 /**
118 * This is called whenever glFlush() is called.
119 */
120 void (*Flush)( struct gl_context *ctx );
121
122 /**
123 * Clear the color/depth/stencil/accum buffer(s).
124 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
125 * renderbuffers need to be cleared.
126 */
127 void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
128
129 /**
130 * Execute glAccum command.
131 */
132 void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
133
134
135 /**
136 * Execute glRasterPos, updating the ctx->Current.Raster fields
137 */
138 void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
139
140 /**
141 * \name Image-related functions
142 */
143 /*@{*/
144
145 /**
146 * Called by glDrawPixels().
147 * \p unpack describes how to unpack the source image data.
148 */
149 void (*DrawPixels)( struct gl_context *ctx,
150 GLint x, GLint y, GLsizei width, GLsizei height,
151 GLenum format, GLenum type,
152 const struct gl_pixelstore_attrib *unpack,
153 const GLvoid *pixels );
154
155 /**
156 * Called by glReadPixels().
157 */
158 void (*ReadPixels)( struct gl_context *ctx,
159 GLint x, GLint y, GLsizei width, GLsizei height,
160 GLenum format, GLenum type,
161 const struct gl_pixelstore_attrib *unpack,
162 GLvoid *dest );
163
164 /**
165 * Called by glCopyPixels().
166 */
167 void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
168 GLsizei width, GLsizei height,
169 GLint dstx, GLint dsty, GLenum type );
170
171 /**
172 * Called by glBitmap().
173 */
174 void (*Bitmap)( struct gl_context *ctx,
175 GLint x, GLint y, GLsizei width, GLsizei height,
176 const struct gl_pixelstore_attrib *unpack,
177 const GLubyte *bitmap );
178 /*@}*/
179
180
181 /**
182 * \name Texture image functions
183 */
184 /*@{*/
185
186 /**
187 * Choose actual hardware texture format given the texture target, the
188 * user-provided source image format and type and the desired internal
189 * format. In some cases, srcFormat and srcType can be GL_NONE.
190 * Note: target may be GL_TEXTURE_CUBE_MAP, but never
191 * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
192 * Called by glTexImage(), etc.
193 */
194 gl_format (*ChooseTextureFormat)( struct gl_context *ctx,
195 GLenum target, GLint internalFormat,
196 GLenum srcFormat, GLenum srcType );
197
198 /**
199 * Determine sample counts support for a particular target and format
200 *
201 * \param ctx GL context
202 * \param target GL target enum
203 * \param internalFormat GL format enum
204 * \param samples Buffer to hold the returned sample counts.
205 * Drivers \b must \b not return more than 16 counts.
206 *
207 * \returns
208 * The number of sample counts actually written to \c samples. If
209 * \c internaFormat is not renderable, zero is returned.
210 */
211 size_t (*QuerySamplesForFormat)(struct gl_context *ctx,
212 GLenum target,
213 GLenum internalFormat,
214 int samples[16]);
215
216 /**
217 * Called by glTexImage[123]D() and glCopyTexImage[12]D()
218 * Allocate texture memory and copy the user's image to the buffer.
219 * The gl_texture_image fields, etc. will be fully initialized.
220 * The parameters are the same as glTexImage3D(), plus:
221 * \param dims 1, 2, or 3 indicating glTexImage1/2/3D()
222 * \param packing describes how to unpack the source data.
223 * \param texImage is the destination texture image.
224 */
225 void (*TexImage)(struct gl_context *ctx, GLuint dims,
226 struct gl_texture_image *texImage,
227 GLenum format, GLenum type, const GLvoid *pixels,
228 const struct gl_pixelstore_attrib *packing);
229
230 /**
231 * Called by glTexSubImage[123]D().
232 * Replace a subset of the target texture with new texel data.
233 */
234 void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
235 struct gl_texture_image *texImage,
236 GLint xoffset, GLint yoffset, GLint zoffset,
237 GLsizei width, GLsizei height, GLint depth,
238 GLenum format, GLenum type,
239 const GLvoid *pixels,
240 const struct gl_pixelstore_attrib *packing);
241
242
243 /**
244 * Called by glGetTexImage().
245 */
246 void (*GetTexImage)( struct gl_context *ctx,
247 GLenum format, GLenum type, GLvoid *pixels,
248 struct gl_texture_image *texImage );
249
250 /**
251 * Called by glCopyTex[Sub]Image[123]D().
252 */
253 void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
254 struct gl_texture_image *texImage,
255 GLint xoffset, GLint yoffset, GLint zoffset,
256 struct gl_renderbuffer *rb,
257 GLint x, GLint y,
258 GLsizei width, GLsizei height);
259
260 /**
261 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
262 */
263 void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
264 struct gl_texture_object *texObj);
265
266 /**
267 * Called by glTexImage, glCompressedTexImage, glCopyTexImage
268 * and glTexStorage to check if the dimensions of the texture image
269 * are too large.
270 * \param target any GL_PROXY_TEXTURE_x target
271 * \return GL_TRUE if the image is OK, GL_FALSE if too large
272 */
273 GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
274 GLint level, gl_format format,
275 GLint width, GLint height,
276 GLint depth, GLint border);
277 /*@}*/
278
279
280 /**
281 * \name Compressed texture functions
282 */
283 /*@{*/
284
285 /**
286 * Called by glCompressedTexImage[123]D().
287 */
288 void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
289 struct gl_texture_image *texImage,
290 GLsizei imageSize, const GLvoid *data);
291
292 /**
293 * Called by glCompressedTexSubImage[123]D().
294 */
295 void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
296 struct gl_texture_image *texImage,
297 GLint xoffset, GLint yoffset, GLint zoffset,
298 GLsizei width, GLint height, GLint depth,
299 GLenum format,
300 GLsizei imageSize, const GLvoid *data);
301
302 /**
303 * Called by glGetCompressedTexImage.
304 */
305 void (*GetCompressedTexImage)(struct gl_context *ctx,
306 struct gl_texture_image *texImage,
307 GLvoid *data);
308 /*@}*/
309
310 /**
311 * \name Texture object / image functions
312 */
313 /*@{*/
314
315 /**
316 * Called by glBindTexture().
317 */
318 void (*BindTexture)( struct gl_context *ctx, GLenum target,
319 struct gl_texture_object *tObj );
320
321 /**
322 * Called to allocate a new texture object. Drivers will usually
323 * allocate/return a subclass of gl_texture_object.
324 */
325 struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
326 GLuint name, GLenum target);
327 /**
328 * Called to delete/free a texture object. Drivers should free the
329 * object and any image data it contains.
330 */
331 void (*DeleteTexture)(struct gl_context *ctx,
332 struct gl_texture_object *texObj);
333
334 /** Called to allocate a new texture image object. */
335 struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
336
337 /** Called to free a texture image object returned by NewTextureImage() */
338 void (*DeleteTextureImage)(struct gl_context *ctx,
339 struct gl_texture_image *);
340
341 /** Called to allocate memory for a single texture image */
342 GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
343 struct gl_texture_image *texImage);
344
345 /** Free the memory for a single texture image */
346 void (*FreeTextureImageBuffer)(struct gl_context *ctx,
347 struct gl_texture_image *texImage);
348
349 /** Map a slice of a texture image into user space.
350 * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
351 * indicates the 1D array index.
352 * \param texImage the texture image
353 * \param slice the 3D image slice or array texture slice
354 * \param x, y, w, h region of interest
355 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
356 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
357 * \param mapOut returns start of mapping of region of interest
358 * \param rowStrideOut returns row stride (in bytes). In the case of a
359 * compressed texture, this is the byte stride between one row of blocks
360 * and another.
361 */
362 void (*MapTextureImage)(struct gl_context *ctx,
363 struct gl_texture_image *texImage,
364 GLuint slice,
365 GLuint x, GLuint y, GLuint w, GLuint h,
366 GLbitfield mode,
367 GLubyte **mapOut, GLint *rowStrideOut);
368
369 void (*UnmapTextureImage)(struct gl_context *ctx,
370 struct gl_texture_image *texImage,
371 GLuint slice);
372
373 /** For GL_ARB_texture_storage. Allocate memory for whole mipmap stack.
374 * All the gl_texture_images in the texture object will have their
375 * dimensions, format, etc. initialized already.
376 */
377 GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
378 struct gl_texture_object *texObj,
379 GLsizei levels, GLsizei width,
380 GLsizei height, GLsizei depth);
381
382 /**
383 * Map a renderbuffer into user space.
384 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
385 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
386 */
387 void (*MapRenderbuffer)(struct gl_context *ctx,
388 struct gl_renderbuffer *rb,
389 GLuint x, GLuint y, GLuint w, GLuint h,
390 GLbitfield mode,
391 GLubyte **mapOut, GLint *rowStrideOut);
392
393 void (*UnmapRenderbuffer)(struct gl_context *ctx,
394 struct gl_renderbuffer *rb);
395
396 /*@}*/
397
398
399 /**
400 * \name Vertex/fragment program functions
401 */
402 /*@{*/
403 /** Bind a vertex/fragment program */
404 void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog);
405 /** Allocate a new program */
406 struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id);
407 /** Delete a program */
408 void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
409 /**
410 * Notify driver that a program string (and GPU code) has been specified
411 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
412 * supported by the driver.
413 */
414 GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
415 struct gl_program *prog);
416
417 /**
418 * Notify driver that the sampler uniforms for the current program have
419 * changed. On some drivers, this may require shader recompiles.
420 */
421 void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
422 struct gl_program *prog);
423
424 /** Query if program can be loaded onto hardware */
425 GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
426 struct gl_program *prog);
427
428 /*@}*/
429
430 /**
431 * \name GLSL shader/program functions.
432 */
433 /*@{*/
434 /**
435 * Called when a shader program is linked.
436 *
437 * This gives drivers an opportunity to clone the IR and make their
438 * own transformations on it for the purposes of code generation.
439 */
440 GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader);
441 /*@}*/
442
443 /**
444 * \name State-changing functions.
445 *
446 * \note drawing functions are above.
447 *
448 * These functions are called by their corresponding OpenGL API functions.
449 * They are \e also called by the gl_PopAttrib() function!!!
450 * May add more functions like these to the device driver in the future.
451 */
452 /*@{*/
453 /** Specify the alpha test function */
454 void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
455 /** Set the blend color */
456 void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
457 /** Set the blend equation */
458 void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA);
459 void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
460 GLenum modeRGB, GLenum modeA);
461 /** Specify pixel arithmetic */
462 void (*BlendFuncSeparate)(struct gl_context *ctx,
463 GLenum sfactorRGB, GLenum dfactorRGB,
464 GLenum sfactorA, GLenum dfactorA);
465 void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
466 GLenum sfactorRGB, GLenum dfactorRGB,
467 GLenum sfactorA, GLenum dfactorA);
468 /** Specify a plane against which all geometry is clipped */
469 void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation );
470 /** Enable and disable writing of frame buffer color components */
471 void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
472 GLboolean bmask, GLboolean amask );
473 void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
474 GLboolean gmask, GLboolean bmask, GLboolean amask);
475 /** Cause a material color to track the current color */
476 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
477 /** Specify whether front- or back-facing facets can be culled */
478 void (*CullFace)(struct gl_context *ctx, GLenum mode);
479 /** Define front- and back-facing polygons */
480 void (*FrontFace)(struct gl_context *ctx, GLenum mode);
481 /** Specify the value used for depth buffer comparisons */
482 void (*DepthFunc)(struct gl_context *ctx, GLenum func);
483 /** Enable or disable writing into the depth buffer */
484 void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
485 /** Specify mapping of depth values from NDC to window coordinates */
486 void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval);
487 /** Specify the current buffer for writing */
488 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
489 /** Specify the buffers for writing for fragment programs*/
490 void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers );
491 /** Enable or disable server-side gl capabilities */
492 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
493 /** Specify fog parameters */
494 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
495 /** Specify implementation-specific hints */
496 void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
497 /** Set light source parameters.
498 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
499 * been transformed to eye-space.
500 */
501 void (*Lightfv)(struct gl_context *ctx, GLenum light,
502 GLenum pname, const GLfloat *params );
503 /** Set the lighting model parameters */
504 void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
505 /** Specify the line stipple pattern */
506 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
507 /** Specify the width of rasterized lines */
508 void (*LineWidth)(struct gl_context *ctx, GLfloat width);
509 /** Specify a logical pixel operation for color index rendering */
510 void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
511 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
512 const GLfloat *params);
513 /** Specify the diameter of rasterized points */
514 void (*PointSize)(struct gl_context *ctx, GLfloat size);
515 /** Select a polygon rasterization mode */
516 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
517 /** Set the scale and units used to calculate depth values */
518 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units);
519 /** Set the polygon stippling pattern */
520 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
521 /* Specifies the current buffer for reading */
522 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
523 /** Set rasterization mode */
524 void (*RenderMode)(struct gl_context *ctx, GLenum mode );
525 /** Define the scissor box */
526 void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
527 /** Select flat or smooth shading */
528 void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
529 /** OpenGL 2.0 two-sided StencilFunc */
530 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
531 GLint ref, GLuint mask);
532 /** OpenGL 2.0 two-sided StencilMask */
533 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
534 /** OpenGL 2.0 two-sided StencilOp */
535 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
536 GLenum zfail, GLenum zpass);
537 /** Control the generation of texture coordinates */
538 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
539 const GLfloat *params);
540 /** Set texture environment parameters */
541 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
542 const GLfloat *param);
543 /** Set texture parameters */
544 void (*TexParameter)(struct gl_context *ctx, GLenum target,
545 struct gl_texture_object *texObj,
546 GLenum pname, const GLfloat *params);
547 /** Set the viewport */
548 void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
549 /*@}*/
550
551
552 /**
553 * \name Vertex/pixel buffer object functions
554 */
555 /*@{*/
556 void (*BindBuffer)( struct gl_context *ctx, GLenum target,
557 struct gl_buffer_object *obj );
558
559 struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer,
560 GLenum target );
561
562 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
563
564 GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size,
565 const GLvoid *data, GLenum usage,
566 struct gl_buffer_object *obj );
567
568 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
569 GLsizeiptrARB size, const GLvoid *data,
570 struct gl_buffer_object *obj );
571
572 void (*GetBufferSubData)( struct gl_context *ctx,
573 GLintptrARB offset, GLsizeiptrARB size,
574 GLvoid *data, struct gl_buffer_object *obj );
575
576 void (*CopyBufferSubData)( struct gl_context *ctx,
577 struct gl_buffer_object *src,
578 struct gl_buffer_object *dst,
579 GLintptr readOffset, GLintptr writeOffset,
580 GLsizeiptr size );
581
582 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
583 */
584 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
585 GLsizeiptr length, GLbitfield access,
586 struct gl_buffer_object *obj);
587
588 void (*FlushMappedBufferRange)(struct gl_context *ctx,
589 GLintptr offset, GLsizeiptr length,
590 struct gl_buffer_object *obj);
591
592 GLboolean (*UnmapBuffer)( struct gl_context *ctx,
593 struct gl_buffer_object *obj );
594 /*@}*/
595
596 /**
597 * \name Functions for GL_APPLE_object_purgeable
598 */
599 /*@{*/
600 /* variations on ObjectPurgeable */
601 GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
602 GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
603 GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
604
605 /* variations on ObjectUnpurgeable */
606 GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
607 GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
608 GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
609 /*@}*/
610
611 /**
612 * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
613 */
614 /*@{*/
615 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name);
616 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name);
617 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
618 struct gl_framebuffer *drawFb,
619 struct gl_framebuffer *readFb);
620 void (*FramebufferRenderbuffer)(struct gl_context *ctx,
621 struct gl_framebuffer *fb,
622 GLenum attachment,
623 struct gl_renderbuffer *rb);
624 void (*RenderTexture)(struct gl_context *ctx,
625 struct gl_framebuffer *fb,
626 struct gl_renderbuffer_attachment *att);
627 void (*FinishRenderTexture)(struct gl_context *ctx,
628 struct gl_renderbuffer_attachment *att);
629 void (*ValidateFramebuffer)(struct gl_context *ctx,
630 struct gl_framebuffer *fb);
631 /*@}*/
632 void (*BlitFramebuffer)(struct gl_context *ctx,
633 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
634 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
635 GLbitfield mask, GLenum filter);
636 void (*DiscardFramebuffer)(struct gl_context *ctx,
637 GLenum target, GLsizei numAttachments, const GLenum *attachments);
638
639 /**
640 * \name Query objects
641 */
642 /*@{*/
643 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
644 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
645 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
646 void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
647 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
648 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
649 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
650 /*@}*/
651
652
653 /**
654 * \name Vertex Array objects
655 */
656 /*@{*/
657 struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
658 void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
659 void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
660 /*@}*/
661
662 /**
663 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
664 */
665 /*@{*/
666 struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type);
667 void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
668 struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name);
669 void (*DeleteShaderProgram)(struct gl_context *ctx,
670 struct gl_shader_program *shProg);
671 void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
672 /*@}*/
673
674
675 /**
676 * \name Support for multiple T&L engines
677 */
678 /*@{*/
679
680 /**
681 * Set by the driver-supplied T&L engine.
682 *
683 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
684 */
685 GLuint CurrentExecPrimitive;
686
687 /**
688 * Current glBegin state of an in-progress compilation. May be
689 * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
690 * or PRIM_UNKNOWN.
691 */
692 GLuint CurrentSavePrimitive;
693
694
695 #define FLUSH_STORED_VERTICES 0x1
696 #define FLUSH_UPDATE_CURRENT 0x2
697 /**
698 * Set by the driver-supplied T&L engine whenever vertices are buffered
699 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not
700 * updated.
701 *
702 * The dd_function_table::FlushVertices call below may be used to resolve
703 * these conditions.
704 */
705 GLuint NeedFlush;
706 GLuint SaveNeedFlush;
707
708
709 /* Called prior to any of the GLvertexformat functions being
710 * called. Paired with Driver.FlushVertices().
711 */
712 void (*BeginVertices)( struct gl_context *ctx );
713
714 /**
715 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
716 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
717 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
718 * __struct gl_contextRec::Current and gl_light_attrib::Material
719 *
720 * Note that the default T&L engine never clears the
721 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
722 */
723 void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
724 void (*SaveFlushVertices)( struct gl_context *ctx );
725
726 /**
727 * Give the driver the opportunity to hook in its own vtxfmt for
728 * compiling optimized display lists. This is called on each valid
729 * glBegin() during list compilation.
730 */
731 GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
732
733 /**
734 * Notify driver that the special derived value _NeedEyeCoords has
735 * changed.
736 */
737 void (*LightingSpaceChange)( struct gl_context *ctx );
738
739 /**
740 * Called by glNewList().
741 *
742 * Let the T&L component know what is going on with display lists
743 * in time to make changes to dispatch tables, etc.
744 */
745 void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
746 /**
747 * Called by glEndList().
748 *
749 * \sa dd_function_table::NewList.
750 */
751 void (*EndList)( struct gl_context *ctx );
752
753 /**
754 * Called by glCallList(s).
755 *
756 * Notify the T&L component before and after calling a display list.
757 */
758 void (*BeginCallList)( struct gl_context *ctx,
759 struct gl_display_list *dlist );
760 /**
761 * Called by glEndCallList().
762 *
763 * \sa dd_function_table::BeginCallList.
764 */
765 void (*EndCallList)( struct gl_context *ctx );
766
767 /**@}*/
768
769 /**
770 * \name GL_ARB_sync interfaces
771 */
772 /*@{*/
773 struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
774 void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield);
775 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
776 void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
777 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
778 GLbitfield, GLuint64);
779 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
780 GLbitfield, GLuint64);
781 /*@}*/
782
783 /** GL_NV_conditional_render */
784 void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q,
785 GLenum mode);
786 void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q);
787
788 /**
789 * \name GL_OES_draw_texture interface
790 */
791 /*@{*/
792 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
793 GLfloat width, GLfloat height);
794 /*@}*/
795
796 /**
797 * \name GL_OES_EGL_image interface
798 */
799 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
800 struct gl_texture_object *texObj,
801 struct gl_texture_image *texImage,
802 GLeglImageOES image_handle);
803 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
804 struct gl_renderbuffer *rb,
805 void *image_handle);
806
807 /**
808 * \name GL_EXT_transform_feedback interface
809 */
810 struct gl_transform_feedback_object *
811 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
812 void (*DeleteTransformFeedback)(struct gl_context *ctx,
813 struct gl_transform_feedback_object *obj);
814 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
815 struct gl_transform_feedback_object *obj);
816 void (*EndTransformFeedback)(struct gl_context *ctx,
817 struct gl_transform_feedback_object *obj);
818 void (*PauseTransformFeedback)(struct gl_context *ctx,
819 struct gl_transform_feedback_object *obj);
820 void (*ResumeTransformFeedback)(struct gl_context *ctx,
821 struct gl_transform_feedback_object *obj);
822
823 /**
824 * \name GL_NV_texture_barrier interface
825 */
826 void (*TextureBarrier)(struct gl_context *ctx);
827
828 /**
829 * \name GL_ARB_sampler_objects
830 */
831 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
832 GLuint name);
833 void (*DeleteSamplerObject)(struct gl_context *ctx,
834 struct gl_sampler_object *samp);
835
836 /**
837 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
838 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
839 */
840 uint64_t (*GetTimestamp)(struct gl_context *ctx);
841
842 /**
843 * \name GL_ARB_texture_multisample
844 */
845 void (*GetSamplePosition)(struct gl_context *ctx,
846 struct gl_framebuffer *fb,
847 GLuint index,
848 GLfloat *outValue);
849 };
850
851
852 /**
853 * Transform/Clip/Lighting interface
854 *
855 * Drivers present a reduced set of the functions possible in
856 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
857 * remaining functions to map down to these entry points.
858 *
859 * These are the initial values to be installed into dispatch by
860 * mesa. If the T&L driver wants to modify the dispatch table
861 * while installed, it must do so itself. It would be possible for
862 * the vertexformat to install its own initial values for these
863 * functions, but this way there is an obvious list of what is
864 * expected of the driver.
865 *
866 * If the driver wants to hook in entry points other than those
867 * listed, it must restore them to their original values in
868 * the disable() callback, below.
869 */
870 typedef struct {
871 /**
872 * \name Vertex
873 */
874 /*@{*/
875 void (GLAPIENTRYP ArrayElement)( GLint );
876 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
877 void (GLAPIENTRYP Color3fv)( const GLfloat * );
878 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
879 void (GLAPIENTRYP Color4fv)( const GLfloat * );
880 void (GLAPIENTRYP EdgeFlag)( GLboolean );
881 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
882 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
883 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
884 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
885 void (GLAPIENTRYP EvalPoint1)( GLint );
886 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
887 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
888 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
889 void (GLAPIENTRYP Indexf)( GLfloat );
890 void (GLAPIENTRYP Indexfv)( const GLfloat * );
891 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
892 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
893 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
894 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
895 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
896 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
897 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
898 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
899 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
900 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
901 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
902 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
903 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
904 void (GLAPIENTRYP TexCoord1f)( GLfloat );
905 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
906 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
907 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
908 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
909 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
910 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
911 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
912 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
913 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
914 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
915 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
916 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
917 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
918 void (GLAPIENTRYP CallList)( GLuint );
919 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
920 void (GLAPIENTRYP Begin)( GLenum );
921 void (GLAPIENTRYP End)( void );
922 void (GLAPIENTRYP PrimitiveRestartNV)( void );
923 /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
924 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
925 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
926 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
927 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
928 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
929 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
930 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
931 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
932 /* GL_ARB_vertex_program */
933 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
934 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
935 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
936 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
937 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
938 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
939 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
940 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
941
942 /* GL_EXT_gpu_shader4 / GL 3.0 */
943 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
944 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
945 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
946 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
947 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
948 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
949 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
950
951 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
952 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
953 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
954 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
955 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
956 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
957 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
958
959 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
960 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
961 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
962
963 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
964 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
965
966 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
967 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
968
969 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
970 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
971
972 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
973 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
974
975 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
976 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
977
978 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
979 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
980
981 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
982 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
983 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
984 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
985 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
986 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
987 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
988 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
989
990 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
991 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
992
993 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
994 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
995
996 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
997 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
998
999 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1000 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1001
1002 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1003 GLboolean normalized, GLuint value);
1004 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1005 GLboolean normalized, GLuint value);
1006 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1007 GLboolean normalized, GLuint value);
1008 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1009 GLboolean normalized, GLuint value);
1010 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1011 GLboolean normalized,
1012 const GLuint *value);
1013 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1014 GLboolean normalized,
1015 const GLuint *value);
1016 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1017 GLboolean normalized,
1018 const GLuint *value);
1019 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1020 GLboolean normalized,
1021 const GLuint *value);
1022
1023 /*@}*/
1024
1025 void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
1026
1027 /**
1028 * \name Array
1029 */
1030 /*@{*/
1031 void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
1032 void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
1033 const GLvoid *indices );
1034 void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
1035 GLuint end, GLsizei count,
1036 GLenum type, const GLvoid *indices );
1037 void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count,
1038 GLenum type,
1039 const GLvoid **indices,
1040 GLsizei primcount);
1041 void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
1042 GLenum type,
1043 const GLvoid *indices,
1044 GLint basevertex );
1045 void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
1046 GLuint end, GLsizei count,
1047 GLenum type,
1048 const GLvoid *indices,
1049 GLint basevertex);
1050 void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
1051 const GLsizei *count,
1052 GLenum type,
1053 const GLvoid * const *indices,
1054 GLsizei primcount,
1055 const GLint *basevertex);
1056 void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first,
1057 GLsizei count, GLsizei primcount);
1058 void (GLAPIENTRYP DrawArraysInstancedBaseInstance)(GLenum mode, GLint first,
1059 GLsizei count, GLsizei primcount,
1060 GLuint baseinstance);
1061 void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count,
1062 GLenum type, const GLvoid *indices,
1063 GLsizei primcount);
1064 void (GLAPIENTRYP DrawElementsInstancedBaseInstance)(GLenum mode, GLsizei count,
1065 GLenum type, const GLvoid *indices,
1066 GLsizei primcount, GLuint baseinstance);
1067 void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count,
1068 GLenum type, const GLvoid *indices,
1069 GLsizei primcount, GLint basevertex);
1070 void (GLAPIENTRYP DrawElementsInstancedBaseVertexBaseInstance)(GLenum mode, GLsizei count,
1071 GLenum type, const GLvoid *indices,
1072 GLsizei primcount, GLint basevertex,
1073 GLuint baseinstance);
1074 void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint name);
1075 void (GLAPIENTRYP DrawTransformFeedbackStream)(GLenum mode, GLuint name,
1076 GLuint stream);
1077 void (GLAPIENTRYP DrawTransformFeedbackInstanced)(GLenum mode, GLuint name,
1078 GLsizei primcount);
1079 void (GLAPIENTRYP DrawTransformFeedbackStreamInstanced)(GLenum mode,
1080 GLuint name,
1081 GLuint stream,
1082 GLsizei primcount);
1083 /*@}*/
1084
1085 /**
1086 * \name Eval
1087 *
1088 * If you don't support eval, fallback to the default vertex format
1089 * on receiving an eval call and use the pipeline mechanism to
1090 * provide partial T&L acceleration.
1091 *
1092 * Mesa will provide a set of helper functions to do eval within
1093 * accelerated vertex formats, eventually...
1094 */
1095 /*@{*/
1096 void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
1097 void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1098 /*@}*/
1099
1100 } GLvertexformat;
1101
1102
1103 #endif /* DD_INCLUDED */