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