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