dd.h revision cdc920a0
17117f1b4Smrg/**
27117f1b4Smrg * \file dd.h
37117f1b4Smrg * Device driver interfaces.
47117f1b4Smrg */
57117f1b4Smrg
67117f1b4Smrg/*
77117f1b4Smrg * Mesa 3-D graphics library
87117f1b4Smrg * Version:  6.5.2
97117f1b4Smrg *
107117f1b4Smrg * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
117117f1b4Smrg *
127117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a
137117f1b4Smrg * copy of this software and associated documentation files (the "Software"),
147117f1b4Smrg * to deal in the Software without restriction, including without limitation
157117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
167117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the
177117f1b4Smrg * Software is furnished to do so, subject to the following conditions:
187117f1b4Smrg *
197117f1b4Smrg * The above copyright notice and this permission notice shall be included
207117f1b4Smrg * in all copies or substantial portions of the Software.
217117f1b4Smrg *
227117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
237117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
247117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
257117f1b4Smrg * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
267117f1b4Smrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
277117f1b4Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
287117f1b4Smrg */
297117f1b4Smrg
307117f1b4Smrg
317117f1b4Smrg#ifndef DD_INCLUDED
327117f1b4Smrg#define DD_INCLUDED
337117f1b4Smrg
347117f1b4Smrg/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
357117f1b4Smrg
367117f1b4Smrgstruct gl_pixelstore_attrib;
374a49301eSmrgstruct gl_display_list;
384a49301eSmrg
394a49301eSmrg#if FEATURE_ARB_vertex_buffer_object
404a49301eSmrg/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
414a49301eSmrg * NULL) if buffer is unavailable for immediate mapping.
424a49301eSmrg *
434a49301eSmrg * Does GL_MAP_INVALIDATE_RANGE_BIT do this?  It seems so, but it
444a49301eSmrg * would require more book-keeping in the driver than seems necessary
454a49301eSmrg * at this point.
464a49301eSmrg *
474a49301eSmrg * Does GL_MAP_INVALDIATE_BUFFER_BIT do this?  Not really -- we don't
484a49301eSmrg * want to provoke the driver to throw away the old storage, we will
494a49301eSmrg * respect the contents of already referenced data.
504a49301eSmrg */
514a49301eSmrg#define MESA_MAP_NOWAIT_BIT       0x0040
524a49301eSmrg#endif
534a49301eSmrg
547117f1b4Smrg
557117f1b4Smrg/**
567117f1b4Smrg * Device driver function table.
577117f1b4Smrg * Core Mesa uses these function pointers to call into device drivers.
587117f1b4Smrg * Most of these functions directly correspond to OpenGL state commands.
597117f1b4Smrg * Core Mesa will call these functions after error checking has been done
607117f1b4Smrg * so that the drivers don't have to worry about error testing.
617117f1b4Smrg *
627117f1b4Smrg * Vertex transformation/clipping/lighting is patched into the T&L module.
637117f1b4Smrg * Rasterization functions are patched into the swrast module.
647117f1b4Smrg *
657117f1b4Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c
667117f1b4Smrg * file should be updated too!!!
677117f1b4Smrg */
687117f1b4Smrgstruct dd_function_table {
697117f1b4Smrg   /**
707117f1b4Smrg    * Return a string as needed by glGetString().
717117f1b4Smrg    * Only the GL_RENDERER query must be implemented.  Otherwise, NULL can be
727117f1b4Smrg    * returned.
737117f1b4Smrg    */
747117f1b4Smrg   const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
757117f1b4Smrg
767117f1b4Smrg   /**
777117f1b4Smrg    * Notify the driver after Mesa has made some internal state changes.
787117f1b4Smrg    *
797117f1b4Smrg    * This is in addition to any state change callbacks Mesa may already have
807117f1b4Smrg    * made.
817117f1b4Smrg    */
827117f1b4Smrg   void (*UpdateState)( GLcontext *ctx, GLbitfield new_state );
837117f1b4Smrg
847117f1b4Smrg   /**
857117f1b4Smrg    * Get the width and height of the named buffer/window.
867117f1b4Smrg    *
877117f1b4Smrg    * Mesa uses this to determine when the driver's window size has changed.
887117f1b4Smrg    * XXX OBSOLETE: this function will be removed in the future.
897117f1b4Smrg    */
907117f1b4Smrg   void (*GetBufferSize)( GLframebuffer *buffer,
917117f1b4Smrg                          GLuint *width, GLuint *height );
927117f1b4Smrg
937117f1b4Smrg   /**
947117f1b4Smrg    * Resize the given framebuffer to the given size.
957117f1b4Smrg    * XXX OBSOLETE: this function will be removed in the future.
967117f1b4Smrg    */
977117f1b4Smrg   void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb,
987117f1b4Smrg                          GLuint width, GLuint height);
997117f1b4Smrg
1007117f1b4Smrg   /**
1017117f1b4Smrg    * Called whenever an error is generated.
1027117f1b4Smrg    * __GLcontextRec::ErrorValue contains the error value.
1037117f1b4Smrg    */
1047117f1b4Smrg   void (*Error)( GLcontext *ctx );
1057117f1b4Smrg
1067117f1b4Smrg   /**
1077117f1b4Smrg    * This is called whenever glFinish() is called.
1087117f1b4Smrg    */
1097117f1b4Smrg   void (*Finish)( GLcontext *ctx );
1107117f1b4Smrg
1117117f1b4Smrg   /**
1127117f1b4Smrg    * This is called whenever glFlush() is called.
1137117f1b4Smrg    */
1147117f1b4Smrg   void (*Flush)( GLcontext *ctx );
1157117f1b4Smrg
1167117f1b4Smrg   /**
1177117f1b4Smrg    * Clear the color/depth/stencil/accum buffer(s).
1187117f1b4Smrg    * \param buffers  a bitmask of BUFFER_BIT_* flags indicating which
1197117f1b4Smrg    *                 renderbuffers need to be cleared.
1207117f1b4Smrg    */
1217117f1b4Smrg   void (*Clear)( GLcontext *ctx, GLbitfield buffers );
1227117f1b4Smrg
1237117f1b4Smrg   /**
1247117f1b4Smrg    * Execute glAccum command.
1257117f1b4Smrg    */
1267117f1b4Smrg   void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
1277117f1b4Smrg
1287117f1b4Smrg
129c1f859d4Smrg   /**
130c1f859d4Smrg    * Execute glRasterPos, updating the ctx->Current.Raster fields
131c1f859d4Smrg    */
132c1f859d4Smrg   void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] );
133c1f859d4Smrg
1347117f1b4Smrg   /**
1357117f1b4Smrg    * \name Image-related functions
1367117f1b4Smrg    */
1377117f1b4Smrg   /*@{*/
1387117f1b4Smrg
1397117f1b4Smrg   /**
1407117f1b4Smrg    * Called by glDrawPixels().
1417117f1b4Smrg    * \p unpack describes how to unpack the source image data.
1427117f1b4Smrg    */
1437117f1b4Smrg   void (*DrawPixels)( GLcontext *ctx,
1447117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1457117f1b4Smrg		       GLenum format, GLenum type,
1467117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1477117f1b4Smrg		       const GLvoid *pixels );
1487117f1b4Smrg
1497117f1b4Smrg   /**
1507117f1b4Smrg    * Called by glReadPixels().
1517117f1b4Smrg    */
1527117f1b4Smrg   void (*ReadPixels)( GLcontext *ctx,
1537117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1547117f1b4Smrg		       GLenum format, GLenum type,
1557117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1567117f1b4Smrg		       GLvoid *dest );
1577117f1b4Smrg
1587117f1b4Smrg   /**
1597117f1b4Smrg    * Called by glCopyPixels().
1607117f1b4Smrg    */
1617117f1b4Smrg   void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy,
1627117f1b4Smrg                       GLsizei width, GLsizei height,
1637117f1b4Smrg                       GLint dstx, GLint dsty, GLenum type );
1647117f1b4Smrg
1657117f1b4Smrg   /**
1667117f1b4Smrg    * Called by glBitmap().
1677117f1b4Smrg    */
1687117f1b4Smrg   void (*Bitmap)( GLcontext *ctx,
1697117f1b4Smrg		   GLint x, GLint y, GLsizei width, GLsizei height,
1707117f1b4Smrg		   const struct gl_pixelstore_attrib *unpack,
1717117f1b4Smrg		   const GLubyte *bitmap );
1727117f1b4Smrg   /*@}*/
1737117f1b4Smrg
1747117f1b4Smrg
1757117f1b4Smrg   /**
1767117f1b4Smrg    * \name Texture image functions
1777117f1b4Smrg    */
1787117f1b4Smrg   /*@{*/
1797117f1b4Smrg
1807117f1b4Smrg   /**
1817117f1b4Smrg    * Choose texture format.
1827117f1b4Smrg    *
1837117f1b4Smrg    * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
1847117f1b4Smrg    * functions.  The driver should examine \p internalFormat and return a
185cdc920a0Smrg    * gl_format value.
1867117f1b4Smrg    */
1874a49301eSmrg   GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
1884a49301eSmrg                                     GLenum srcFormat, GLenum srcType );
1897117f1b4Smrg
1907117f1b4Smrg   /**
1917117f1b4Smrg    * Called by glTexImage1D().
1927117f1b4Smrg    *
1937117f1b4Smrg    * \param target user specified.
1947117f1b4Smrg    * \param format user specified.
1957117f1b4Smrg    * \param type user specified.
1967117f1b4Smrg    * \param pixels user specified.
1977117f1b4Smrg    * \param packing indicates the image packing of pixels.
1987117f1b4Smrg    * \param texObj is the target texture object.
1997117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
2007117f1b4Smrg    * width, \p height, \p depth, \p border and \p internalFormat information.
2017117f1b4Smrg    *
2027117f1b4Smrg    * \p retainInternalCopy is returned by this function and indicates whether
2037117f1b4Smrg    * core Mesa should keep an internal copy of the texture image.
2047117f1b4Smrg    *
2057117f1b4Smrg    * Drivers should call a fallback routine from texstore.c if needed.
2067117f1b4Smrg    */
2077117f1b4Smrg   void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level,
2087117f1b4Smrg                       GLint internalFormat,
2097117f1b4Smrg                       GLint width, GLint border,
2107117f1b4Smrg                       GLenum format, GLenum type, const GLvoid *pixels,
2117117f1b4Smrg                       const struct gl_pixelstore_attrib *packing,
2127117f1b4Smrg                       struct gl_texture_object *texObj,
2137117f1b4Smrg                       struct gl_texture_image *texImage );
2147117f1b4Smrg
2157117f1b4Smrg   /**
2167117f1b4Smrg    * Called by glTexImage2D().
2177117f1b4Smrg    *
2187117f1b4Smrg    * \sa dd_function_table::TexImage1D.
2197117f1b4Smrg    */
2207117f1b4Smrg   void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level,
2217117f1b4Smrg                       GLint internalFormat,
2227117f1b4Smrg                       GLint width, GLint height, GLint border,
2237117f1b4Smrg                       GLenum format, GLenum type, const GLvoid *pixels,
2247117f1b4Smrg                       const struct gl_pixelstore_attrib *packing,
2257117f1b4Smrg                       struct gl_texture_object *texObj,
2267117f1b4Smrg                       struct gl_texture_image *texImage );
2277117f1b4Smrg
2287117f1b4Smrg   /**
2297117f1b4Smrg    * Called by glTexImage3D().
2307117f1b4Smrg    *
2317117f1b4Smrg    * \sa dd_function_table::TexImage1D.
2327117f1b4Smrg    */
2337117f1b4Smrg   void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level,
2347117f1b4Smrg                       GLint internalFormat,
2357117f1b4Smrg                       GLint width, GLint height, GLint depth, GLint border,
2367117f1b4Smrg                       GLenum format, GLenum type, const GLvoid *pixels,
2377117f1b4Smrg                       const struct gl_pixelstore_attrib *packing,
2387117f1b4Smrg                       struct gl_texture_object *texObj,
2397117f1b4Smrg                       struct gl_texture_image *texImage );
2407117f1b4Smrg
2417117f1b4Smrg   /**
2427117f1b4Smrg    * Called by glTexSubImage1D().
2437117f1b4Smrg    *
2447117f1b4Smrg    * \param target user specified.
2457117f1b4Smrg    * \param level user specified.
2467117f1b4Smrg    * \param xoffset user specified.
2477117f1b4Smrg    * \param yoffset user specified.
2487117f1b4Smrg    * \param zoffset user specified.
2497117f1b4Smrg    * \param width user specified.
2507117f1b4Smrg    * \param height user specified.
2517117f1b4Smrg    * \param depth user specified.
2527117f1b4Smrg    * \param format user specified.
2537117f1b4Smrg    * \param type user specified.
2547117f1b4Smrg    * \param pixels user specified.
2557117f1b4Smrg    * \param packing indicates the image packing of pixels.
2567117f1b4Smrg    * \param texObj is the target texture object.
2577117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
2587117f1b4Smrg    * width, \p height, \p border and \p internalFormat information.
2597117f1b4Smrg    *
2607117f1b4Smrg    * The driver should use a fallback routine from texstore.c if needed.
2617117f1b4Smrg    */
2627117f1b4Smrg   void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
2637117f1b4Smrg                          GLint xoffset, GLsizei width,
2647117f1b4Smrg                          GLenum format, GLenum type,
2657117f1b4Smrg                          const GLvoid *pixels,
2667117f1b4Smrg                          const struct gl_pixelstore_attrib *packing,
2677117f1b4Smrg                          struct gl_texture_object *texObj,
2687117f1b4Smrg                          struct gl_texture_image *texImage );
2697117f1b4Smrg
2707117f1b4Smrg   /**
2717117f1b4Smrg    * Called by glTexSubImage2D().
2727117f1b4Smrg    *
2737117f1b4Smrg    * \sa dd_function_table::TexSubImage1D.
2747117f1b4Smrg    */
2757117f1b4Smrg   void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
2767117f1b4Smrg                          GLint xoffset, GLint yoffset,
2777117f1b4Smrg                          GLsizei width, GLsizei height,
2787117f1b4Smrg                          GLenum format, GLenum type,
2797117f1b4Smrg                          const GLvoid *pixels,
2807117f1b4Smrg                          const struct gl_pixelstore_attrib *packing,
2817117f1b4Smrg                          struct gl_texture_object *texObj,
2827117f1b4Smrg                          struct gl_texture_image *texImage );
2837117f1b4Smrg
2847117f1b4Smrg   /**
2857117f1b4Smrg    * Called by glTexSubImage3D().
2867117f1b4Smrg    *
2877117f1b4Smrg    * \sa dd_function_table::TexSubImage1D.
2887117f1b4Smrg    */
2897117f1b4Smrg   void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
2907117f1b4Smrg                          GLint xoffset, GLint yoffset, GLint zoffset,
2917117f1b4Smrg                          GLsizei width, GLsizei height, GLint depth,
2927117f1b4Smrg                          GLenum format, GLenum type,
2937117f1b4Smrg                          const GLvoid *pixels,
2947117f1b4Smrg                          const struct gl_pixelstore_attrib *packing,
2957117f1b4Smrg                          struct gl_texture_object *texObj,
2967117f1b4Smrg                          struct gl_texture_image *texImage );
2977117f1b4Smrg
2987117f1b4Smrg   /**
2997117f1b4Smrg    * Called by glGetTexImage().
3007117f1b4Smrg    */
3017117f1b4Smrg   void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level,
3027117f1b4Smrg                        GLenum format, GLenum type, GLvoid *pixels,
3037117f1b4Smrg                        struct gl_texture_object *texObj,
3047117f1b4Smrg                        struct gl_texture_image *texImage );
3057117f1b4Smrg
3067117f1b4Smrg   /**
3077117f1b4Smrg    * Called by glCopyTexImage1D().
3087117f1b4Smrg    *
3097117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3107117f1b4Smrg    */
3117117f1b4Smrg   void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level,
3127117f1b4Smrg                           GLenum internalFormat, GLint x, GLint y,
3137117f1b4Smrg                           GLsizei width, GLint border );
3147117f1b4Smrg
3157117f1b4Smrg   /**
3167117f1b4Smrg    * Called by glCopyTexImage2D().
3177117f1b4Smrg    *
3187117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3197117f1b4Smrg    */
3207117f1b4Smrg   void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level,
3217117f1b4Smrg                           GLenum internalFormat, GLint x, GLint y,
3227117f1b4Smrg                           GLsizei width, GLsizei height, GLint border );
3237117f1b4Smrg
3247117f1b4Smrg   /**
3257117f1b4Smrg    * Called by glCopyTexSubImage1D().
3267117f1b4Smrg    *
3277117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3287117f1b4Smrg    */
3297117f1b4Smrg   void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
3307117f1b4Smrg                              GLint xoffset,
3317117f1b4Smrg                              GLint x, GLint y, GLsizei width );
3327117f1b4Smrg   /**
3337117f1b4Smrg    * Called by glCopyTexSubImage2D().
3347117f1b4Smrg    *
3357117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3367117f1b4Smrg    */
3377117f1b4Smrg   void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
3387117f1b4Smrg                              GLint xoffset, GLint yoffset,
3397117f1b4Smrg                              GLint x, GLint y,
3407117f1b4Smrg                              GLsizei width, GLsizei height );
3417117f1b4Smrg   /**
3427117f1b4Smrg    * Called by glCopyTexSubImage3D().
3437117f1b4Smrg    *
3447117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3457117f1b4Smrg    */
3467117f1b4Smrg   void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
3477117f1b4Smrg                              GLint xoffset, GLint yoffset, GLint zoffset,
3487117f1b4Smrg                              GLint x, GLint y,
3497117f1b4Smrg                              GLsizei width, GLsizei height );
3507117f1b4Smrg
351c1f859d4Smrg   /**
352c1f859d4Smrg    * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
353c1f859d4Smrg    */
354c1f859d4Smrg   void (*GenerateMipmap)(GLcontext *ctx, GLenum target,
355c1f859d4Smrg                          struct gl_texture_object *texObj);
356c1f859d4Smrg
3577117f1b4Smrg   /**
3587117f1b4Smrg    * Called by glTexImage[123]D when user specifies a proxy texture
3597117f1b4Smrg    * target.
3607117f1b4Smrg    *
3617117f1b4Smrg    * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
3627117f1b4Smrg    */
3637117f1b4Smrg   GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target,
3647117f1b4Smrg                                  GLint level, GLint internalFormat,
3657117f1b4Smrg                                  GLenum format, GLenum type,
3667117f1b4Smrg                                  GLint width, GLint height,
3677117f1b4Smrg                                  GLint depth, GLint border);
3687117f1b4Smrg   /*@}*/
3697117f1b4Smrg
3707117f1b4Smrg
3717117f1b4Smrg   /**
3727117f1b4Smrg    * \name Compressed texture functions
3737117f1b4Smrg    */
3747117f1b4Smrg   /*@{*/
3757117f1b4Smrg
3767117f1b4Smrg   /**
3777117f1b4Smrg    * Called by glCompressedTexImage1D().
3787117f1b4Smrg    *
3797117f1b4Smrg    * \param target user specified.
3807117f1b4Smrg    * \param format user specified.
3817117f1b4Smrg    * \param type user specified.
3827117f1b4Smrg    * \param pixels user specified.
3837117f1b4Smrg    * \param packing indicates the image packing of pixels.
3847117f1b4Smrg    * \param texObj is the target texture object.
3857117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
3867117f1b4Smrg    * width, \p height, \p depth, \p border and \p internalFormat information.
3877117f1b4Smrg    *
3887117f1b4Smrg    * \a retainInternalCopy is returned by this function and indicates whether
3897117f1b4Smrg    * core Mesa should keep an internal copy of the texture image.
3907117f1b4Smrg    */
3917117f1b4Smrg   void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
3927117f1b4Smrg                                 GLint level, GLint internalFormat,
3937117f1b4Smrg                                 GLsizei width, GLint border,
3947117f1b4Smrg                                 GLsizei imageSize, const GLvoid *data,
3957117f1b4Smrg                                 struct gl_texture_object *texObj,
3967117f1b4Smrg                                 struct gl_texture_image *texImage );
3977117f1b4Smrg   /**
3987117f1b4Smrg    * Called by glCompressedTexImage2D().
3997117f1b4Smrg    *
4007117f1b4Smrg    * \sa dd_function_table::CompressedTexImage1D.
4017117f1b4Smrg    */
4027117f1b4Smrg   void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
4037117f1b4Smrg                                 GLint level, GLint internalFormat,
4047117f1b4Smrg                                 GLsizei width, GLsizei height, GLint border,
4057117f1b4Smrg                                 GLsizei imageSize, const GLvoid *data,
4067117f1b4Smrg                                 struct gl_texture_object *texObj,
4077117f1b4Smrg                                 struct gl_texture_image *texImage );
4087117f1b4Smrg   /**
4097117f1b4Smrg    * Called by glCompressedTexImage3D().
4107117f1b4Smrg    *
4117117f1b4Smrg    * \sa dd_function_table::CompressedTexImage3D.
4127117f1b4Smrg    */
4137117f1b4Smrg   void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
4147117f1b4Smrg                                 GLint level, GLint internalFormat,
4157117f1b4Smrg                                 GLsizei width, GLsizei height, GLsizei depth,
4167117f1b4Smrg                                 GLint border,
4177117f1b4Smrg                                 GLsizei imageSize, const GLvoid *data,
4187117f1b4Smrg                                 struct gl_texture_object *texObj,
4197117f1b4Smrg                                 struct gl_texture_image *texImage );
4207117f1b4Smrg
4217117f1b4Smrg   /**
4227117f1b4Smrg    * Called by glCompressedTexSubImage1D().
4237117f1b4Smrg    *
4247117f1b4Smrg    * \param target user specified.
4257117f1b4Smrg    * \param level user specified.
4267117f1b4Smrg    * \param xoffset user specified.
4277117f1b4Smrg    * \param yoffset user specified.
4287117f1b4Smrg    * \param zoffset user specified.
4297117f1b4Smrg    * \param width user specified.
4307117f1b4Smrg    * \param height user specified.
4317117f1b4Smrg    * \param depth user specified.
4327117f1b4Smrg    * \param imageSize user specified.
4337117f1b4Smrg    * \param data user specified.
4347117f1b4Smrg    * \param texObj is the target texture object.
4357117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
4367117f1b4Smrg    * width, \p height, \p depth, \p border and \p internalFormat information.
4377117f1b4Smrg    */
4387117f1b4Smrg   void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level,
4397117f1b4Smrg                                   GLint xoffset, GLsizei width,
4407117f1b4Smrg                                   GLenum format,
4417117f1b4Smrg                                   GLsizei imageSize, const GLvoid *data,
4427117f1b4Smrg                                   struct gl_texture_object *texObj,
4437117f1b4Smrg                                   struct gl_texture_image *texImage);
4447117f1b4Smrg   /**
4457117f1b4Smrg    * Called by glCompressedTexSubImage2D().
4467117f1b4Smrg    *
4477117f1b4Smrg    * \sa dd_function_table::CompressedTexImage3D.
4487117f1b4Smrg    */
4497117f1b4Smrg   void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level,
4507117f1b4Smrg                                   GLint xoffset, GLint yoffset,
4517117f1b4Smrg                                   GLsizei width, GLint height,
4527117f1b4Smrg                                   GLenum format,
4537117f1b4Smrg                                   GLsizei imageSize, const GLvoid *data,
4547117f1b4Smrg                                   struct gl_texture_object *texObj,
4557117f1b4Smrg                                   struct gl_texture_image *texImage);
4567117f1b4Smrg   /**
4577117f1b4Smrg    * Called by glCompressedTexSubImage3D().
4587117f1b4Smrg    *
4597117f1b4Smrg    * \sa dd_function_table::CompressedTexImage3D.
4607117f1b4Smrg    */
4617117f1b4Smrg   void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level,
4627117f1b4Smrg                                   GLint xoffset, GLint yoffset, GLint zoffset,
4637117f1b4Smrg                                   GLsizei width, GLint height, GLint depth,
4647117f1b4Smrg                                   GLenum format,
4657117f1b4Smrg                                   GLsizei imageSize, const GLvoid *data,
4667117f1b4Smrg                                   struct gl_texture_object *texObj,
4677117f1b4Smrg                                   struct gl_texture_image *texImage);
4687117f1b4Smrg
4697117f1b4Smrg
4707117f1b4Smrg   /**
4717117f1b4Smrg    * Called by glGetCompressedTexImage.
4727117f1b4Smrg    */
4737117f1b4Smrg   void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level,
4747117f1b4Smrg                                 GLvoid *img,
475c1f859d4Smrg                                 struct gl_texture_object *texObj,
476c1f859d4Smrg                                 struct gl_texture_image *texImage);
4777117f1b4Smrg
4787117f1b4Smrg   /*@}*/
4797117f1b4Smrg
4807117f1b4Smrg   /**
4817117f1b4Smrg    * \name Texture object functions
4827117f1b4Smrg    */
4837117f1b4Smrg   /*@{*/
4847117f1b4Smrg
4857117f1b4Smrg   /**
4867117f1b4Smrg    * Called by glBindTexture().
4877117f1b4Smrg    */
4887117f1b4Smrg   void (*BindTexture)( GLcontext *ctx, GLenum target,
4897117f1b4Smrg                        struct gl_texture_object *tObj );
4907117f1b4Smrg
4917117f1b4Smrg   /**
4927117f1b4Smrg    * Called to allocate a new texture object.
4937117f1b4Smrg    * A new gl_texture_object should be returned.  The driver should
4947117f1b4Smrg    * attach to it any device-specific info it needs.
4957117f1b4Smrg    */
4967117f1b4Smrg   struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name,
4977117f1b4Smrg                                                   GLenum target );
4987117f1b4Smrg   /**
4997117f1b4Smrg    * Called when a texture object is about to be deallocated.
5007117f1b4Smrg    *
5017117f1b4Smrg    * Driver should delete the gl_texture_object object and anything
5027117f1b4Smrg    * hanging off of it.
5037117f1b4Smrg    */
5047117f1b4Smrg   void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
5057117f1b4Smrg
5067117f1b4Smrg   /**
5077117f1b4Smrg    * Called to allocate a new texture image object.
5087117f1b4Smrg    */
5097117f1b4Smrg   struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx );
5107117f1b4Smrg
5117117f1b4Smrg   /**
5127117f1b4Smrg    * Called to free tImage->Data.
5137117f1b4Smrg    */
5147117f1b4Smrg   void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
5157117f1b4Smrg
5167117f1b4Smrg   /** Map texture image data into user space */
5177117f1b4Smrg   void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
5187117f1b4Smrg   /** Unmap texture images from user space */
5197117f1b4Smrg   void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
5207117f1b4Smrg
5217117f1b4Smrg   /**
5227117f1b4Smrg    * Note: no context argument.  This function doesn't initially look
5237117f1b4Smrg    * like it belongs here, except that the driver is the only entity
5247117f1b4Smrg    * that knows for sure how the texture memory is allocated - via
5257117f1b4Smrg    * the above callbacks.  There is then an argument that the driver
5267117f1b4Smrg    * knows what memcpy paths might be fast.  Typically this is invoked with
5277117f1b4Smrg    *
5287117f1b4Smrg    * to -- a pointer into texture memory allocated by NewTextureImage() above.
5297117f1b4Smrg    * from -- a pointer into client memory or a mesa temporary.
5307117f1b4Smrg    * sz -- nr bytes to copy.
5317117f1b4Smrg    */
5327117f1b4Smrg   void* (*TextureMemCpy)( void *to, const void *from, size_t sz );
5337117f1b4Smrg
5347117f1b4Smrg   /**
5357117f1b4Smrg    * Called by glAreTextureResident().
5367117f1b4Smrg    */
5377117f1b4Smrg   GLboolean (*IsTextureResident)( GLcontext *ctx,
5387117f1b4Smrg                                   struct gl_texture_object *t );
5397117f1b4Smrg
5407117f1b4Smrg   /**
5417117f1b4Smrg    * Called when the texture's color lookup table is changed.
5427117f1b4Smrg    *
5437117f1b4Smrg    * If \p tObj is NULL then the shared texture palette
5447117f1b4Smrg    * gl_texture_object::Palette is to be updated.
5457117f1b4Smrg    */
5467117f1b4Smrg   void (*UpdateTexturePalette)( GLcontext *ctx,
5477117f1b4Smrg                                 struct gl_texture_object *tObj );
5487117f1b4Smrg   /*@}*/
5497117f1b4Smrg
5507117f1b4Smrg
5517117f1b4Smrg   /**
5527117f1b4Smrg    * \name Imaging functionality
5537117f1b4Smrg    */
5547117f1b4Smrg   /*@{*/
5557117f1b4Smrg   void (*CopyColorTable)( GLcontext *ctx,
5567117f1b4Smrg			   GLenum target, GLenum internalformat,
5577117f1b4Smrg			   GLint x, GLint y, GLsizei width );
5587117f1b4Smrg
5597117f1b4Smrg   void (*CopyColorSubTable)( GLcontext *ctx,
5607117f1b4Smrg			      GLenum target, GLsizei start,
5617117f1b4Smrg			      GLint x, GLint y, GLsizei width );
5627117f1b4Smrg
5637117f1b4Smrg   void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target,
5647117f1b4Smrg				    GLenum internalFormat,
5657117f1b4Smrg				    GLint x, GLint y, GLsizei width );
5667117f1b4Smrg
5677117f1b4Smrg   void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target,
5687117f1b4Smrg				    GLenum internalFormat,
5697117f1b4Smrg				    GLint x, GLint y,
5707117f1b4Smrg				    GLsizei width, GLsizei height );
5717117f1b4Smrg   /*@}*/
5727117f1b4Smrg
5737117f1b4Smrg
5747117f1b4Smrg   /**
5757117f1b4Smrg    * \name Vertex/fragment program functions
5767117f1b4Smrg    */
5777117f1b4Smrg   /*@{*/
5787117f1b4Smrg   /** Bind a vertex/fragment program */
5797117f1b4Smrg   void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog);
5807117f1b4Smrg   /** Allocate a new program */
5817117f1b4Smrg   struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id);
5827117f1b4Smrg   /** Delete a program */
5837117f1b4Smrg   void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog);
584cdc920a0Smrg   /**
585cdc920a0Smrg    * Notify driver that a program string (and GPU code) has been specified
586cdc920a0Smrg    * or modified.  Return GL_TRUE or GL_FALSE to indicate if the program is
587cdc920a0Smrg    * supported by the driver.
588cdc920a0Smrg    */
589cdc920a0Smrg   GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
590cdc920a0Smrg                                    struct gl_program *prog);
5917117f1b4Smrg
5927117f1b4Smrg   /** Query if program can be loaded onto hardware */
5937117f1b4Smrg   GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target,
5947117f1b4Smrg				struct gl_program *prog);
5957117f1b4Smrg
5967117f1b4Smrg   /*@}*/
5977117f1b4Smrg
5987117f1b4Smrg
5997117f1b4Smrg   /**
6007117f1b4Smrg    * \name State-changing functions.
6017117f1b4Smrg    *
6027117f1b4Smrg    * \note drawing functions are above.
6037117f1b4Smrg    *
6047117f1b4Smrg    * These functions are called by their corresponding OpenGL API functions.
6057117f1b4Smrg    * They are \e also called by the gl_PopAttrib() function!!!
6067117f1b4Smrg    * May add more functions like these to the device driver in the future.
6077117f1b4Smrg    */
6087117f1b4Smrg   /*@{*/
6097117f1b4Smrg   /** Specify the alpha test function */
6107117f1b4Smrg   void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref);
6117117f1b4Smrg   /** Set the blend color */
6127117f1b4Smrg   void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]);
6137117f1b4Smrg   /** Set the blend equation */
6147117f1b4Smrg   void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA);
6157117f1b4Smrg   /** Specify pixel arithmetic */
6167117f1b4Smrg   void (*BlendFuncSeparate)(GLcontext *ctx,
6177117f1b4Smrg                             GLenum sfactorRGB, GLenum dfactorRGB,
6187117f1b4Smrg                             GLenum sfactorA, GLenum dfactorA);
6197117f1b4Smrg   /** Specify clear values for the color buffers */
6207117f1b4Smrg   void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]);
6217117f1b4Smrg   /** Specify the clear value for the depth buffer */
6227117f1b4Smrg   void (*ClearDepth)(GLcontext *ctx, GLclampd d);
6237117f1b4Smrg   /** Specify the clear value for the stencil buffer */
6247117f1b4Smrg   void (*ClearStencil)(GLcontext *ctx, GLint s);
6257117f1b4Smrg   /** Specify a plane against which all geometry is clipped */
6267117f1b4Smrg   void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation );
6277117f1b4Smrg   /** Enable and disable writing of frame buffer color components */
6287117f1b4Smrg   void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask,
6297117f1b4Smrg                     GLboolean bmask, GLboolean amask );
630cdc920a0Smrg   void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask,
631cdc920a0Smrg                            GLboolean gmask, GLboolean bmask, GLboolean amask);
6327117f1b4Smrg   /** Cause a material color to track the current color */
6337117f1b4Smrg   void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode);
6347117f1b4Smrg   /** Specify whether front- or back-facing facets can be culled */
6357117f1b4Smrg   void (*CullFace)(GLcontext *ctx, GLenum mode);
6367117f1b4Smrg   /** Define front- and back-facing polygons */
6377117f1b4Smrg   void (*FrontFace)(GLcontext *ctx, GLenum mode);
6387117f1b4Smrg   /** Specify the value used for depth buffer comparisons */
6397117f1b4Smrg   void (*DepthFunc)(GLcontext *ctx, GLenum func);
6407117f1b4Smrg   /** Enable or disable writing into the depth buffer */
6417117f1b4Smrg   void (*DepthMask)(GLcontext *ctx, GLboolean flag);
6427117f1b4Smrg   /** Specify mapping of depth values from NDC to window coordinates */
6437117f1b4Smrg   void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval);
6447117f1b4Smrg   /** Specify the current buffer for writing */
6457117f1b4Smrg   void (*DrawBuffer)( GLcontext *ctx, GLenum buffer );
6467117f1b4Smrg   /** Specify the buffers for writing for fragment programs*/
6477117f1b4Smrg   void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers );
6487117f1b4Smrg   /** Enable or disable server-side gl capabilities */
6497117f1b4Smrg   void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state);
6507117f1b4Smrg   /** Specify fog parameters */
6517117f1b4Smrg   void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
6527117f1b4Smrg   /** Specify implementation-specific hints */
6537117f1b4Smrg   void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
6547117f1b4Smrg   /** Set light source parameters.
6557117f1b4Smrg    * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
6567117f1b4Smrg    * been transformed to eye-space.
6577117f1b4Smrg    */
6587117f1b4Smrg   void (*Lightfv)(GLcontext *ctx, GLenum light,
6597117f1b4Smrg		   GLenum pname, const GLfloat *params );
6607117f1b4Smrg   /** Set the lighting model parameters */
6617117f1b4Smrg   void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
6627117f1b4Smrg   /** Specify the line stipple pattern */
6637117f1b4Smrg   void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern );
6647117f1b4Smrg   /** Specify the width of rasterized lines */
6657117f1b4Smrg   void (*LineWidth)(GLcontext *ctx, GLfloat width);
6667117f1b4Smrg   /** Specify a logical pixel operation for color index rendering */
6677117f1b4Smrg   void (*LogicOpcode)(GLcontext *ctx, GLenum opcode);
6687117f1b4Smrg   void (*PointParameterfv)(GLcontext *ctx, GLenum pname,
6697117f1b4Smrg                            const GLfloat *params);
6707117f1b4Smrg   /** Specify the diameter of rasterized points */
6717117f1b4Smrg   void (*PointSize)(GLcontext *ctx, GLfloat size);
6727117f1b4Smrg   /** Select a polygon rasterization mode */
6737117f1b4Smrg   void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
6747117f1b4Smrg   /** Set the scale and units used to calculate depth values */
6757117f1b4Smrg   void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units);
6767117f1b4Smrg   /** Set the polygon stippling pattern */
6777117f1b4Smrg   void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
6787117f1b4Smrg   /* Specifies the current buffer for reading */
6797117f1b4Smrg   void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
6807117f1b4Smrg   /** Set rasterization mode */
6817117f1b4Smrg   void (*RenderMode)(GLcontext *ctx, GLenum mode );
6827117f1b4Smrg   /** Define the scissor box */
6837117f1b4Smrg   void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
6847117f1b4Smrg   /** Select flat or smooth shading */
6857117f1b4Smrg   void (*ShadeModel)(GLcontext *ctx, GLenum mode);
6867117f1b4Smrg   /** OpenGL 2.0 two-sided StencilFunc */
6877117f1b4Smrg   void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func,
6887117f1b4Smrg                               GLint ref, GLuint mask);
6897117f1b4Smrg   /** OpenGL 2.0 two-sided StencilMask */
6907117f1b4Smrg   void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask);
6917117f1b4Smrg   /** OpenGL 2.0 two-sided StencilOp */
6927117f1b4Smrg   void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail,
6937117f1b4Smrg                             GLenum zfail, GLenum zpass);
6947117f1b4Smrg   /** Control the generation of texture coordinates */
6957117f1b4Smrg   void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname,
6967117f1b4Smrg		  const GLfloat *params);
6977117f1b4Smrg   /** Set texture environment parameters */
6987117f1b4Smrg   void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname,
6997117f1b4Smrg                  const GLfloat *param);
7007117f1b4Smrg   /** Set texture parameters */
7017117f1b4Smrg   void (*TexParameter)(GLcontext *ctx, GLenum target,
7027117f1b4Smrg                        struct gl_texture_object *texObj,
7037117f1b4Smrg                        GLenum pname, const GLfloat *params);
7047117f1b4Smrg   /** Set the viewport */
7057117f1b4Smrg   void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
7067117f1b4Smrg   /*@}*/
7077117f1b4Smrg
7087117f1b4Smrg
7097117f1b4Smrg   /**
7107117f1b4Smrg    * \name State-query functions
7117117f1b4Smrg    *
7127117f1b4Smrg    * Return GL_TRUE if query was completed, GL_FALSE otherwise.
7137117f1b4Smrg    */
7147117f1b4Smrg   /*@{*/
7157117f1b4Smrg   /** Return the value or values of a selected parameter */
7167117f1b4Smrg   GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result);
7177117f1b4Smrg   /** Return the value or values of a selected parameter */
7187117f1b4Smrg   GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result);
7197117f1b4Smrg   /** Return the value or values of a selected parameter */
7207117f1b4Smrg   GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result);
7217117f1b4Smrg   /** Return the value or values of a selected parameter */
7227117f1b4Smrg   GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result);
7237117f1b4Smrg   /** Return the value or values of a selected parameter */
7244a49301eSmrg   GLboolean (*GetInteger64v)(GLcontext *ctx, GLenum pname, GLint64 *result);
7254a49301eSmrg   /** Return the value or values of a selected parameter */
7267117f1b4Smrg   GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result);
7277117f1b4Smrg   /*@}*/
7287117f1b4Smrg
7297117f1b4Smrg
7307117f1b4Smrg   /**
7317117f1b4Smrg    * \name Vertex/pixel buffer object functions
7327117f1b4Smrg    */
7337117f1b4Smrg#if FEATURE_ARB_vertex_buffer_object
7347117f1b4Smrg   /*@{*/
7357117f1b4Smrg   void (*BindBuffer)( GLcontext *ctx, GLenum target,
7367117f1b4Smrg		       struct gl_buffer_object *obj );
7377117f1b4Smrg
7387117f1b4Smrg   struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer,
7397117f1b4Smrg						 GLenum target );
7407117f1b4Smrg
7417117f1b4Smrg   void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj );
7427117f1b4Smrg
7434a49301eSmrg   GLboolean (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
7444a49301eSmrg                            const GLvoid *data, GLenum usage,
7454a49301eSmrg                            struct gl_buffer_object *obj );
7467117f1b4Smrg
7477117f1b4Smrg   void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset,
7487117f1b4Smrg			  GLsizeiptrARB size, const GLvoid *data,
7497117f1b4Smrg			  struct gl_buffer_object *obj );
7507117f1b4Smrg
7517117f1b4Smrg   void (*GetBufferSubData)( GLcontext *ctx, GLenum target,
7527117f1b4Smrg			     GLintptrARB offset, GLsizeiptrARB size,
7537117f1b4Smrg			     GLvoid *data, struct gl_buffer_object *obj );
7547117f1b4Smrg
7557117f1b4Smrg   void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access,
7567117f1b4Smrg			struct gl_buffer_object *obj );
7577117f1b4Smrg
7584a49301eSmrg   void (*CopyBufferSubData)( GLcontext *ctx,
7594a49301eSmrg                              struct gl_buffer_object *src,
7604a49301eSmrg                              struct gl_buffer_object *dst,
7614a49301eSmrg                              GLintptr readOffset, GLintptr writeOffset,
7624a49301eSmrg                              GLsizeiptr size );
7634a49301eSmrg
7644a49301eSmrg   /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
7654a49301eSmrg    */
766cdc920a0Smrg   void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset,
767cdc920a0Smrg                             GLsizeiptr length, GLbitfield access,
7684a49301eSmrg                             struct gl_buffer_object *obj);
7694a49301eSmrg
770cdc920a0Smrg   void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target,
771cdc920a0Smrg                                  GLintptr offset, GLsizeiptr length,
772cdc920a0Smrg                                  struct gl_buffer_object *obj);
7734a49301eSmrg
7747117f1b4Smrg   GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target,
7757117f1b4Smrg			     struct gl_buffer_object *obj );
7767117f1b4Smrg   /*@}*/
7777117f1b4Smrg#endif
7787117f1b4Smrg
779cdc920a0Smrg   /**
780cdc920a0Smrg    * \name Functions for GL_APPLE_object_purgeable
781cdc920a0Smrg    */
782cdc920a0Smrg#if FEATURE_APPLE_object_purgeable
783cdc920a0Smrg   /*@{*/
784cdc920a0Smrg   /* variations on ObjectPurgeable */
785cdc920a0Smrg   GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
786cdc920a0Smrg   GLenum (*RenderObjectPurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
787cdc920a0Smrg   GLenum (*TextureObjectPurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
788cdc920a0Smrg
789cdc920a0Smrg   /* variations on ObjectUnpurgeable */
790cdc920a0Smrg   GLenum (*BufferObjectUnpurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
791cdc920a0Smrg   GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
792cdc920a0Smrg   GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
793cdc920a0Smrg   /*@}*/
794cdc920a0Smrg#endif
795cdc920a0Smrg
7967117f1b4Smrg   /**
7977117f1b4Smrg    * \name Functions for GL_EXT_framebuffer_object
7987117f1b4Smrg    */
7997117f1b4Smrg#if FEATURE_EXT_framebuffer_object
8007117f1b4Smrg   /*@{*/
8017117f1b4Smrg   struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
8027117f1b4Smrg   struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
8037117f1b4Smrg   void (*BindFramebuffer)(GLcontext *ctx, GLenum target,
804cdc920a0Smrg                           struct gl_framebuffer *drawFb,
805cdc920a0Smrg                           struct gl_framebuffer *readFb);
8067117f1b4Smrg   void (*FramebufferRenderbuffer)(GLcontext *ctx,
8077117f1b4Smrg                                   struct gl_framebuffer *fb,
8087117f1b4Smrg                                   GLenum attachment,
8097117f1b4Smrg                                   struct gl_renderbuffer *rb);
8107117f1b4Smrg   void (*RenderTexture)(GLcontext *ctx,
8117117f1b4Smrg                         struct gl_framebuffer *fb,
8127117f1b4Smrg                         struct gl_renderbuffer_attachment *att);
8137117f1b4Smrg   void (*FinishRenderTexture)(GLcontext *ctx,
8147117f1b4Smrg                               struct gl_renderbuffer_attachment *att);
8154a49301eSmrg   void (*ValidateFramebuffer)(GLcontext *ctx,
8164a49301eSmrg                               struct gl_framebuffer *fb);
8177117f1b4Smrg   /*@}*/
8187117f1b4Smrg#endif
8197117f1b4Smrg#if FEATURE_EXT_framebuffer_blit
8207117f1b4Smrg   void (*BlitFramebuffer)(GLcontext *ctx,
8217117f1b4Smrg                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
8227117f1b4Smrg                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
8237117f1b4Smrg                           GLbitfield mask, GLenum filter);
8247117f1b4Smrg#endif
8257117f1b4Smrg
8267117f1b4Smrg   /**
8277117f1b4Smrg    * \name Query objects
8287117f1b4Smrg    */
8297117f1b4Smrg   /*@{*/
8307117f1b4Smrg   struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id);
831c1f859d4Smrg   void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q);
832c1f859d4Smrg   void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q);
833c1f859d4Smrg   void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q);
834c1f859d4Smrg   void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q);
835c1f859d4Smrg   void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q);
8367117f1b4Smrg   /*@}*/
8377117f1b4Smrg
8387117f1b4Smrg
8397117f1b4Smrg   /**
8407117f1b4Smrg    * \name Vertex Array objects
8417117f1b4Smrg    */
8427117f1b4Smrg   /*@{*/
8437117f1b4Smrg   struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id);
8447117f1b4Smrg   void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
8457117f1b4Smrg   void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
8467117f1b4Smrg   /*@}*/
8477117f1b4Smrg
8487117f1b4Smrg   /**
8497117f1b4Smrg    * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
8507117f1b4Smrg    */
8517117f1b4Smrg   /*@{*/
8527117f1b4Smrg   void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader);
8537117f1b4Smrg   void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index,
8547117f1b4Smrg                              const GLcharARB *name);
8557117f1b4Smrg   void (*CompileShader)(GLcontext *ctx, GLuint shader);
8567117f1b4Smrg   GLuint (*CreateShader)(GLcontext *ctx, GLenum type);
8577117f1b4Smrg   GLuint (*CreateProgram)(GLcontext *ctx);
8587117f1b4Smrg   void (*DeleteProgram2)(GLcontext *ctx, GLuint program);
8597117f1b4Smrg   void (*DeleteShader)(GLcontext *ctx, GLuint shader);
8607117f1b4Smrg   void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader);
8617117f1b4Smrg   void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index,
8627117f1b4Smrg                           GLsizei maxLength, GLsizei * length, GLint * size,
8637117f1b4Smrg                           GLenum * type, GLcharARB * name);
8647117f1b4Smrg   void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index,
8657117f1b4Smrg                            GLsizei maxLength, GLsizei *length, GLint *size,
8667117f1b4Smrg                            GLenum *type, GLcharARB *name);
8677117f1b4Smrg   void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount,
8687117f1b4Smrg                              GLsizei *count, GLuint *obj);
8697117f1b4Smrg   GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program,
8707117f1b4Smrg                              const GLcharARB *name);
8717117f1b4Smrg   GLuint (*GetHandle)(GLcontext *ctx, GLenum pname);
8727117f1b4Smrg   void (*GetProgramiv)(GLcontext *ctx, GLuint program,
8737117f1b4Smrg                        GLenum pname, GLint *params);
8747117f1b4Smrg   void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize,
8757117f1b4Smrg                             GLsizei *length, GLchar *infoLog);
8767117f1b4Smrg   void (*GetShaderiv)(GLcontext *ctx, GLuint shader,
8777117f1b4Smrg                       GLenum pname, GLint *params);
8787117f1b4Smrg   void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize,
8797117f1b4Smrg                            GLsizei *length, GLchar *infoLog);
8807117f1b4Smrg   void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength,
8817117f1b4Smrg                           GLsizei *length, GLcharARB *sourceOut);
8827117f1b4Smrg   void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location,
8837117f1b4Smrg                        GLfloat *params);
884c1f859d4Smrg   void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location,
885c1f859d4Smrg                        GLint *params);
8867117f1b4Smrg   GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program,
8877117f1b4Smrg                               const GLcharARB *name);
8887117f1b4Smrg   GLboolean (*IsProgram)(GLcontext *ctx, GLuint name);
8897117f1b4Smrg   GLboolean (*IsShader)(GLcontext *ctx, GLuint name);
8907117f1b4Smrg   void (*LinkProgram)(GLcontext *ctx, GLuint program);
8917117f1b4Smrg   void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source);
8927117f1b4Smrg   void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count,
8937117f1b4Smrg                   const GLvoid *values, GLenum type);
8947117f1b4Smrg   void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows,
8954a49301eSmrg                         GLint location, GLsizei count,
8967117f1b4Smrg                         GLboolean transpose, const GLfloat *values);
8977117f1b4Smrg   void (*UseProgram)(GLcontext *ctx, GLuint program);
8987117f1b4Smrg   void (*ValidateProgram)(GLcontext *ctx, GLuint program);
8997117f1b4Smrg   /* XXX many more to come */
9007117f1b4Smrg   /*@}*/
9017117f1b4Smrg
9027117f1b4Smrg
9037117f1b4Smrg   /**
9047117f1b4Smrg    * \name Support for multiple T&L engines
9057117f1b4Smrg    */
9067117f1b4Smrg   /*@{*/
9077117f1b4Smrg
9087117f1b4Smrg   /**
9097117f1b4Smrg    * Bitmask of state changes that require the current T&L module to be
9107117f1b4Smrg    * validated, using ValidateTnlModule() below.
9117117f1b4Smrg    */
9127117f1b4Smrg   GLuint NeedValidate;
9137117f1b4Smrg
9147117f1b4Smrg   /**
9157117f1b4Smrg    * Validate the current T&L module.
9167117f1b4Smrg    *
9177117f1b4Smrg    * This is called directly after UpdateState() when a state change that has
9187117f1b4Smrg    * occurred matches the dd_function_table::NeedValidate bitmask above.  This
9197117f1b4Smrg    * ensures all computed values are up to date, thus allowing the driver to
9207117f1b4Smrg    * decide if the current T&L module needs to be swapped out.
9217117f1b4Smrg    *
9227117f1b4Smrg    * This must be non-NULL if a driver installs a custom T&L module and sets
9237117f1b4Smrg    * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
9247117f1b4Smrg    */
9257117f1b4Smrg   void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
9267117f1b4Smrg
9277117f1b4Smrg
928c1f859d4Smrg#define PRIM_OUTSIDE_BEGIN_END   (GL_POLYGON+1)
929c1f859d4Smrg#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
930c1f859d4Smrg#define PRIM_UNKNOWN             (GL_POLYGON+3)
9317117f1b4Smrg
9327117f1b4Smrg   /**
9337117f1b4Smrg    * Set by the driver-supplied T&L engine.
9347117f1b4Smrg    *
9357117f1b4Smrg    * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
9367117f1b4Smrg    */
9377117f1b4Smrg   GLuint CurrentExecPrimitive;
9387117f1b4Smrg
9397117f1b4Smrg   /**
9407117f1b4Smrg    * Current state of an in-progress compilation.
9417117f1b4Smrg    *
9427117f1b4Smrg    * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
9437117f1b4Smrg    * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
9447117f1b4Smrg    */
9457117f1b4Smrg   GLuint CurrentSavePrimitive;
9467117f1b4Smrg
9477117f1b4Smrg
9487117f1b4Smrg#define FLUSH_STORED_VERTICES 0x1
9497117f1b4Smrg#define FLUSH_UPDATE_CURRENT  0x2
9507117f1b4Smrg   /**
9517117f1b4Smrg    * Set by the driver-supplied T&L engine whenever vertices are buffered
9527117f1b4Smrg    * between glBegin()/glEnd() objects or __GLcontextRec::Current is not
9537117f1b4Smrg    * updated.
9547117f1b4Smrg    *
9557117f1b4Smrg    * The dd_function_table::FlushVertices call below may be used to resolve
9567117f1b4Smrg    * these conditions.
9577117f1b4Smrg    */
9587117f1b4Smrg   GLuint NeedFlush;
9597117f1b4Smrg   GLuint SaveNeedFlush;
9607117f1b4Smrg
9614a49301eSmrg
9624a49301eSmrg   /* Called prior to any of the GLvertexformat functions being
9634a49301eSmrg    * called.  Paired with Driver.FlushVertices().
9644a49301eSmrg    */
9654a49301eSmrg   void (*BeginVertices)( GLcontext *ctx );
9664a49301eSmrg
9677117f1b4Smrg   /**
9687117f1b4Smrg    * If inside glBegin()/glEnd(), it should ASSERT(0).  Otherwise, if
9697117f1b4Smrg    * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
9707117f1b4Smrg    * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
9717117f1b4Smrg    * __GLcontextRec::Current and gl_light_attrib::Material
9727117f1b4Smrg    *
9737117f1b4Smrg    * Note that the default T&L engine never clears the
9747117f1b4Smrg    * FLUSH_UPDATE_CURRENT bit, even after performing the update.
9757117f1b4Smrg    */
9767117f1b4Smrg   void (*FlushVertices)( GLcontext *ctx, GLuint flags );
9777117f1b4Smrg   void (*SaveFlushVertices)( GLcontext *ctx );
9787117f1b4Smrg
9797117f1b4Smrg   /**
9807117f1b4Smrg    * Give the driver the opportunity to hook in its own vtxfmt for
9817117f1b4Smrg    * compiling optimized display lists.  This is called on each valid
9827117f1b4Smrg    * glBegin() during list compilation.
9837117f1b4Smrg    */
9847117f1b4Smrg   GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode );
9857117f1b4Smrg
9867117f1b4Smrg   /**
9877117f1b4Smrg    * Notify driver that the special derived value _NeedEyeCoords has
9887117f1b4Smrg    * changed.
9897117f1b4Smrg    */
9907117f1b4Smrg   void (*LightingSpaceChange)( GLcontext *ctx );
9917117f1b4Smrg
9927117f1b4Smrg   /**
9937117f1b4Smrg    * Called by glNewList().
9947117f1b4Smrg    *
9957117f1b4Smrg    * Let the T&L component know what is going on with display lists
9967117f1b4Smrg    * in time to make changes to dispatch tables, etc.
9977117f1b4Smrg    */
9987117f1b4Smrg   void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode );
9997117f1b4Smrg   /**
10007117f1b4Smrg    * Called by glEndList().
10017117f1b4Smrg    *
10027117f1b4Smrg    * \sa dd_function_table::NewList.
10037117f1b4Smrg    */
10047117f1b4Smrg   void (*EndList)( GLcontext *ctx );
10057117f1b4Smrg
10067117f1b4Smrg   /**
10077117f1b4Smrg    * Called by glCallList(s).
10087117f1b4Smrg    *
10097117f1b4Smrg    * Notify the T&L component before and after calling a display list.
10107117f1b4Smrg    */
10117117f1b4Smrg   void (*BeginCallList)( GLcontext *ctx,
10124a49301eSmrg			  struct gl_display_list *dlist );
10137117f1b4Smrg   /**
10147117f1b4Smrg    * Called by glEndCallList().
10157117f1b4Smrg    *
10167117f1b4Smrg    * \sa dd_function_table::BeginCallList.
10177117f1b4Smrg    */
10187117f1b4Smrg   void (*EndCallList)( GLcontext *ctx );
10197117f1b4Smrg
10204a49301eSmrg
10214a49301eSmrg#if FEATURE_ARB_sync
10224a49301eSmrg   /**
10234a49301eSmrg    * \name GL_ARB_sync interfaces
10244a49301eSmrg    */
10254a49301eSmrg   /*@{*/
10264a49301eSmrg   struct gl_sync_object * (*NewSyncObject)(GLcontext *, GLenum);
10274a49301eSmrg   void (*FenceSync)(GLcontext *, struct gl_sync_object *, GLenum, GLbitfield);
10284a49301eSmrg   void (*DeleteSyncObject)(GLcontext *, struct gl_sync_object *);
10294a49301eSmrg   void (*CheckSync)(GLcontext *, struct gl_sync_object *);
10304a49301eSmrg   void (*ClientWaitSync)(GLcontext *, struct gl_sync_object *,
10314a49301eSmrg			  GLbitfield, GLuint64);
10324a49301eSmrg   void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *,
10334a49301eSmrg			  GLbitfield, GLuint64);
10344a49301eSmrg   /*@}*/
10354a49301eSmrg#endif
1036cdc920a0Smrg
1037cdc920a0Smrg   /** GL_NV_conditional_render */
1038cdc920a0Smrg   void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q,
1039cdc920a0Smrg                                  GLenum mode);
1040cdc920a0Smrg   void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q);
1041cdc920a0Smrg
1042cdc920a0Smrg#if FEATURE_OES_draw_texture
1043cdc920a0Smrg   /**
1044cdc920a0Smrg    * \name GL_OES_draw_texture interface
1045cdc920a0Smrg    */
1046cdc920a0Smrg   /*@{*/
1047cdc920a0Smrg   void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
1048cdc920a0Smrg                   GLfloat width, GLfloat height);
1049cdc920a0Smrg   /*@}*/
1050cdc920a0Smrg#endif
1051cdc920a0Smrg
1052cdc920a0Smrg#if FEATURE_OES_EGL_image
1053cdc920a0Smrg   void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target,
1054cdc920a0Smrg				   struct gl_texture_object *texObj,
1055cdc920a0Smrg				   struct gl_texture_image *texImage,
1056cdc920a0Smrg				   GLeglImageOES image_handle);
1057cdc920a0Smrg   void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx,
1058cdc920a0Smrg					     struct gl_renderbuffer *rb,
1059cdc920a0Smrg					     void *image_handle);
1060cdc920a0Smrg#endif
1061cdc920a0Smrg
10627117f1b4Smrg};
10637117f1b4Smrg
10647117f1b4Smrg
10657117f1b4Smrg/**
10667117f1b4Smrg * Transform/Clip/Lighting interface
10677117f1b4Smrg *
10687117f1b4Smrg * Drivers present a reduced set of the functions possible in
10697117f1b4Smrg * glBegin()/glEnd() objects.  Core mesa provides translation stubs for the
10707117f1b4Smrg * remaining functions to map down to these entry points.
10717117f1b4Smrg *
10727117f1b4Smrg * These are the initial values to be installed into dispatch by
10737117f1b4Smrg * mesa.  If the T&L driver wants to modify the dispatch table
10747117f1b4Smrg * while installed, it must do so itself.  It would be possible for
1075cdc920a0Smrg * the vertexformat to install its own initial values for these
10767117f1b4Smrg * functions, but this way there is an obvious list of what is
10777117f1b4Smrg * expected of the driver.
10787117f1b4Smrg *
10797117f1b4Smrg * If the driver wants to hook in entry points other than those
10807117f1b4Smrg * listed, it must restore them to their original values in
10817117f1b4Smrg * the disable() callback, below.
10827117f1b4Smrg */
10837117f1b4Smrgtypedef struct {
10847117f1b4Smrg   /**
10857117f1b4Smrg    * \name Vertex
10867117f1b4Smrg    */
10877117f1b4Smrg   /*@{*/
10887117f1b4Smrg   void (GLAPIENTRYP ArrayElement)( GLint ); /* NOTE */
10897117f1b4Smrg   void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
10907117f1b4Smrg   void (GLAPIENTRYP Color3fv)( const GLfloat * );
10917117f1b4Smrg   void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10927117f1b4Smrg   void (GLAPIENTRYP Color4fv)( const GLfloat * );
10937117f1b4Smrg   void (GLAPIENTRYP EdgeFlag)( GLboolean );
10947117f1b4Smrg   void (GLAPIENTRYP EvalCoord1f)( GLfloat );          /* NOTE */
10957117f1b4Smrg   void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); /* NOTE */
10967117f1b4Smrg   void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */
10977117f1b4Smrg   void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); /* NOTE */
10987117f1b4Smrg   void (GLAPIENTRYP EvalPoint1)( GLint );             /* NOTE */
10997117f1b4Smrg   void (GLAPIENTRYP EvalPoint2)( GLint, GLint );      /* NOTE */
11007117f1b4Smrg   void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
11017117f1b4Smrg   void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
11027117f1b4Smrg   void (GLAPIENTRYP Indexf)( GLfloat );
11037117f1b4Smrg   void (GLAPIENTRYP Indexfv)( const GLfloat * );
11047117f1b4Smrg   void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */
11057117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
11067117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
11077117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
11087117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
11097117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
11107117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
11117117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
11127117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
11137117f1b4Smrg   void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
11147117f1b4Smrg   void (GLAPIENTRYP Normal3fv)( const GLfloat * );
11157117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
11167117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
11177117f1b4Smrg   void (GLAPIENTRYP TexCoord1f)( GLfloat );
11187117f1b4Smrg   void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
11197117f1b4Smrg   void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
11207117f1b4Smrg   void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
11217117f1b4Smrg   void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
11227117f1b4Smrg   void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
11237117f1b4Smrg   void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
11247117f1b4Smrg   void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
11257117f1b4Smrg   void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
11267117f1b4Smrg   void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
11277117f1b4Smrg   void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
11287117f1b4Smrg   void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
11297117f1b4Smrg   void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
11307117f1b4Smrg   void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
11317117f1b4Smrg   void (GLAPIENTRYP CallList)( GLuint );	/* NOTE */
11327117f1b4Smrg   void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );	/* NOTE */
11337117f1b4Smrg   void (GLAPIENTRYP Begin)( GLenum );
11347117f1b4Smrg   void (GLAPIENTRYP End)( void );
11357117f1b4Smrg   /* GL_NV_vertex_program */
11367117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
11377117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
11387117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
11397117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
11407117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
11417117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
11427117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
11437117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
11447117f1b4Smrg#if FEATURE_ARB_vertex_program
11457117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
11467117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
11477117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
11487117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
11497117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
11507117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
11517117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
11527117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
11537117f1b4Smrg#endif
11547117f1b4Smrg   /*@}*/
11557117f1b4Smrg
11567117f1b4Smrg   /*
11577117f1b4Smrg    */
11587117f1b4Smrg   void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
11597117f1b4Smrg
11607117f1b4Smrg   /**
11617117f1b4Smrg    * \name Array
11627117f1b4Smrg    */
11637117f1b4Smrg   /*@{*/
11647117f1b4Smrg   void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
11657117f1b4Smrg   void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
11667117f1b4Smrg			 const GLvoid *indices );
11677117f1b4Smrg   void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
11687117f1b4Smrg			      GLuint end, GLsizei count,
11697117f1b4Smrg			      GLenum type, const GLvoid *indices );
11704a49301eSmrg   void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count,
11714a49301eSmrg					    GLenum type,
11724a49301eSmrg					    const GLvoid **indices,
11734a49301eSmrg					    GLsizei primcount);
11744a49301eSmrg   void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
11754a49301eSmrg					      GLenum type,
11764a49301eSmrg					      const GLvoid *indices,
11774a49301eSmrg					      GLint basevertex );
11784a49301eSmrg   void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
11794a49301eSmrg						   GLuint end, GLsizei count,
11804a49301eSmrg						   GLenum type,
11814a49301eSmrg						   const GLvoid *indices,
11824a49301eSmrg						   GLint basevertex);
11834a49301eSmrg   void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
11844a49301eSmrg						   const GLsizei *count,
11854a49301eSmrg						   GLenum type,
11864a49301eSmrg						   const GLvoid **indices,
11874a49301eSmrg						   GLsizei primcount,
11884a49301eSmrg						   const GLint *basevertex);
11897117f1b4Smrg   /*@}*/
11907117f1b4Smrg
11917117f1b4Smrg   /**
11927117f1b4Smrg    * \name Eval
11937117f1b4Smrg    *
11947117f1b4Smrg    * If you don't support eval, fallback to the default vertex format
11957117f1b4Smrg    * on receiving an eval call and use the pipeline mechanism to
11967117f1b4Smrg    * provide partial T&L acceleration.
11977117f1b4Smrg    *
11987117f1b4Smrg    * Mesa will provide a set of helper functions to do eval within
11997117f1b4Smrg    * accelerated vertex formats, eventually...
12007117f1b4Smrg    */
12017117f1b4Smrg   /*@{*/
12027117f1b4Smrg   void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
12037117f1b4Smrg   void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
12047117f1b4Smrg   /*@}*/
12057117f1b4Smrg
12067117f1b4Smrg} GLvertexformat;
12077117f1b4Smrg
12087117f1b4Smrg
12097117f1b4Smrg#endif /* DD_INCLUDED */
1210