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