dd.h revision c1f859d4
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; 377117f1b4Smrgstruct mesa_display_list; 387117f1b4Smrg 397117f1b4Smrg/** 407117f1b4Smrg * Device driver function table. 417117f1b4Smrg * Core Mesa uses these function pointers to call into device drivers. 427117f1b4Smrg * Most of these functions directly correspond to OpenGL state commands. 437117f1b4Smrg * Core Mesa will call these functions after error checking has been done 447117f1b4Smrg * so that the drivers don't have to worry about error testing. 457117f1b4Smrg * 467117f1b4Smrg * Vertex transformation/clipping/lighting is patched into the T&L module. 477117f1b4Smrg * Rasterization functions are patched into the swrast module. 487117f1b4Smrg * 497117f1b4Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c 507117f1b4Smrg * file should be updated too!!! 517117f1b4Smrg */ 527117f1b4Smrgstruct dd_function_table { 537117f1b4Smrg /** 547117f1b4Smrg * Return a string as needed by glGetString(). 557117f1b4Smrg * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be 567117f1b4Smrg * returned. 577117f1b4Smrg */ 587117f1b4Smrg const GLubyte * (*GetString)( GLcontext *ctx, GLenum name ); 597117f1b4Smrg 607117f1b4Smrg /** 617117f1b4Smrg * Notify the driver after Mesa has made some internal state changes. 627117f1b4Smrg * 637117f1b4Smrg * This is in addition to any state change callbacks Mesa may already have 647117f1b4Smrg * made. 657117f1b4Smrg */ 667117f1b4Smrg void (*UpdateState)( GLcontext *ctx, GLbitfield new_state ); 677117f1b4Smrg 687117f1b4Smrg /** 697117f1b4Smrg * Get the width and height of the named buffer/window. 707117f1b4Smrg * 717117f1b4Smrg * Mesa uses this to determine when the driver's window size has changed. 727117f1b4Smrg * XXX OBSOLETE: this function will be removed in the future. 737117f1b4Smrg */ 747117f1b4Smrg void (*GetBufferSize)( GLframebuffer *buffer, 757117f1b4Smrg GLuint *width, GLuint *height ); 767117f1b4Smrg 777117f1b4Smrg /** 787117f1b4Smrg * Resize the given framebuffer to the given size. 797117f1b4Smrg * XXX OBSOLETE: this function will be removed in the future. 807117f1b4Smrg */ 817117f1b4Smrg void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb, 827117f1b4Smrg GLuint width, GLuint height); 837117f1b4Smrg 847117f1b4Smrg /** 857117f1b4Smrg * Called whenever an error is generated. 867117f1b4Smrg * __GLcontextRec::ErrorValue contains the error value. 877117f1b4Smrg */ 887117f1b4Smrg void (*Error)( GLcontext *ctx ); 897117f1b4Smrg 907117f1b4Smrg /** 917117f1b4Smrg * This is called whenever glFinish() is called. 927117f1b4Smrg */ 937117f1b4Smrg void (*Finish)( GLcontext *ctx ); 947117f1b4Smrg 957117f1b4Smrg /** 967117f1b4Smrg * This is called whenever glFlush() is called. 977117f1b4Smrg */ 987117f1b4Smrg void (*Flush)( GLcontext *ctx ); 997117f1b4Smrg 1007117f1b4Smrg /** 1017117f1b4Smrg * Clear the color/depth/stencil/accum buffer(s). 1027117f1b4Smrg * \param buffers a bitmask of BUFFER_BIT_* flags indicating which 1037117f1b4Smrg * renderbuffers need to be cleared. 1047117f1b4Smrg */ 1057117f1b4Smrg void (*Clear)( GLcontext *ctx, GLbitfield buffers ); 1067117f1b4Smrg 1077117f1b4Smrg /** 1087117f1b4Smrg * Execute glAccum command. 1097117f1b4Smrg */ 1107117f1b4Smrg void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value ); 1117117f1b4Smrg 1127117f1b4Smrg 113c1f859d4Smrg /** 114c1f859d4Smrg * Execute glRasterPos, updating the ctx->Current.Raster fields 115c1f859d4Smrg */ 116c1f859d4Smrg void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] ); 117c1f859d4Smrg 1187117f1b4Smrg /** 1197117f1b4Smrg * \name Image-related functions 1207117f1b4Smrg */ 1217117f1b4Smrg /*@{*/ 1227117f1b4Smrg 1237117f1b4Smrg /** 1247117f1b4Smrg * Called by glDrawPixels(). 1257117f1b4Smrg * \p unpack describes how to unpack the source image data. 1267117f1b4Smrg */ 1277117f1b4Smrg void (*DrawPixels)( GLcontext *ctx, 1287117f1b4Smrg GLint x, GLint y, GLsizei width, GLsizei height, 1297117f1b4Smrg GLenum format, GLenum type, 1307117f1b4Smrg const struct gl_pixelstore_attrib *unpack, 1317117f1b4Smrg const GLvoid *pixels ); 1327117f1b4Smrg 1337117f1b4Smrg /** 1347117f1b4Smrg * Called by glReadPixels(). 1357117f1b4Smrg */ 1367117f1b4Smrg void (*ReadPixels)( GLcontext *ctx, 1377117f1b4Smrg GLint x, GLint y, GLsizei width, GLsizei height, 1387117f1b4Smrg GLenum format, GLenum type, 1397117f1b4Smrg const struct gl_pixelstore_attrib *unpack, 1407117f1b4Smrg GLvoid *dest ); 1417117f1b4Smrg 1427117f1b4Smrg /** 1437117f1b4Smrg * Called by glCopyPixels(). 1447117f1b4Smrg */ 1457117f1b4Smrg void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy, 1467117f1b4Smrg GLsizei width, GLsizei height, 1477117f1b4Smrg GLint dstx, GLint dsty, GLenum type ); 1487117f1b4Smrg 1497117f1b4Smrg /** 1507117f1b4Smrg * Called by glBitmap(). 1517117f1b4Smrg */ 1527117f1b4Smrg void (*Bitmap)( GLcontext *ctx, 1537117f1b4Smrg GLint x, GLint y, GLsizei width, GLsizei height, 1547117f1b4Smrg const struct gl_pixelstore_attrib *unpack, 1557117f1b4Smrg const GLubyte *bitmap ); 1567117f1b4Smrg /*@}*/ 1577117f1b4Smrg 1587117f1b4Smrg 1597117f1b4Smrg /** 1607117f1b4Smrg * \name Texture image functions 1617117f1b4Smrg */ 1627117f1b4Smrg /*@{*/ 1637117f1b4Smrg 1647117f1b4Smrg /** 1657117f1b4Smrg * Choose texture format. 1667117f1b4Smrg * 1677117f1b4Smrg * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback 1687117f1b4Smrg * functions. The driver should examine \p internalFormat and return a 1697117f1b4Smrg * pointer to an appropriate gl_texture_format. 1707117f1b4Smrg */ 1717117f1b4Smrg const struct gl_texture_format *(*ChooseTextureFormat)( GLcontext *ctx, 1727117f1b4Smrg GLint internalFormat, GLenum srcFormat, GLenum srcType ); 1737117f1b4Smrg 1747117f1b4Smrg /** 1757117f1b4Smrg * Called by glTexImage1D(). 1767117f1b4Smrg * 1777117f1b4Smrg * \param target user specified. 1787117f1b4Smrg * \param format user specified. 1797117f1b4Smrg * \param type user specified. 1807117f1b4Smrg * \param pixels user specified. 1817117f1b4Smrg * \param packing indicates the image packing of pixels. 1827117f1b4Smrg * \param texObj is the target texture object. 1837117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 1847117f1b4Smrg * width, \p height, \p depth, \p border and \p internalFormat information. 1857117f1b4Smrg * 1867117f1b4Smrg * \p retainInternalCopy is returned by this function and indicates whether 1877117f1b4Smrg * core Mesa should keep an internal copy of the texture image. 1887117f1b4Smrg * 1897117f1b4Smrg * Drivers should call a fallback routine from texstore.c if needed. 1907117f1b4Smrg */ 1917117f1b4Smrg void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level, 1927117f1b4Smrg GLint internalFormat, 1937117f1b4Smrg GLint width, GLint border, 1947117f1b4Smrg GLenum format, GLenum type, const GLvoid *pixels, 1957117f1b4Smrg const struct gl_pixelstore_attrib *packing, 1967117f1b4Smrg struct gl_texture_object *texObj, 1977117f1b4Smrg struct gl_texture_image *texImage ); 1987117f1b4Smrg 1997117f1b4Smrg /** 2007117f1b4Smrg * Called by glTexImage2D(). 2017117f1b4Smrg * 2027117f1b4Smrg * \sa dd_function_table::TexImage1D. 2037117f1b4Smrg */ 2047117f1b4Smrg void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level, 2057117f1b4Smrg GLint internalFormat, 2067117f1b4Smrg GLint width, GLint height, GLint border, 2077117f1b4Smrg GLenum format, GLenum type, const GLvoid *pixels, 2087117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2097117f1b4Smrg struct gl_texture_object *texObj, 2107117f1b4Smrg struct gl_texture_image *texImage ); 2117117f1b4Smrg 2127117f1b4Smrg /** 2137117f1b4Smrg * Called by glTexImage3D(). 2147117f1b4Smrg * 2157117f1b4Smrg * \sa dd_function_table::TexImage1D. 2167117f1b4Smrg */ 2177117f1b4Smrg void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level, 2187117f1b4Smrg GLint internalFormat, 2197117f1b4Smrg GLint width, GLint height, GLint depth, GLint border, 2207117f1b4Smrg GLenum format, GLenum type, const GLvoid *pixels, 2217117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2227117f1b4Smrg struct gl_texture_object *texObj, 2237117f1b4Smrg struct gl_texture_image *texImage ); 2247117f1b4Smrg 2257117f1b4Smrg /** 2267117f1b4Smrg * Called by glTexSubImage1D(). 2277117f1b4Smrg * 2287117f1b4Smrg * \param target user specified. 2297117f1b4Smrg * \param level user specified. 2307117f1b4Smrg * \param xoffset user specified. 2317117f1b4Smrg * \param yoffset user specified. 2327117f1b4Smrg * \param zoffset user specified. 2337117f1b4Smrg * \param width user specified. 2347117f1b4Smrg * \param height user specified. 2357117f1b4Smrg * \param depth user specified. 2367117f1b4Smrg * \param format user specified. 2377117f1b4Smrg * \param type user specified. 2387117f1b4Smrg * \param pixels user specified. 2397117f1b4Smrg * \param packing indicates the image packing of pixels. 2407117f1b4Smrg * \param texObj is the target texture object. 2417117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 2427117f1b4Smrg * width, \p height, \p border and \p internalFormat information. 2437117f1b4Smrg * 2447117f1b4Smrg * The driver should use a fallback routine from texstore.c if needed. 2457117f1b4Smrg */ 2467117f1b4Smrg void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, 2477117f1b4Smrg GLint xoffset, GLsizei width, 2487117f1b4Smrg GLenum format, GLenum type, 2497117f1b4Smrg const GLvoid *pixels, 2507117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2517117f1b4Smrg struct gl_texture_object *texObj, 2527117f1b4Smrg struct gl_texture_image *texImage ); 2537117f1b4Smrg 2547117f1b4Smrg /** 2557117f1b4Smrg * Called by glTexSubImage2D(). 2567117f1b4Smrg * 2577117f1b4Smrg * \sa dd_function_table::TexSubImage1D. 2587117f1b4Smrg */ 2597117f1b4Smrg void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, 2607117f1b4Smrg GLint xoffset, GLint yoffset, 2617117f1b4Smrg GLsizei width, GLsizei height, 2627117f1b4Smrg GLenum format, GLenum type, 2637117f1b4Smrg const GLvoid *pixels, 2647117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2657117f1b4Smrg struct gl_texture_object *texObj, 2667117f1b4Smrg struct gl_texture_image *texImage ); 2677117f1b4Smrg 2687117f1b4Smrg /** 2697117f1b4Smrg * Called by glTexSubImage3D(). 2707117f1b4Smrg * 2717117f1b4Smrg * \sa dd_function_table::TexSubImage1D. 2727117f1b4Smrg */ 2737117f1b4Smrg void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, 2747117f1b4Smrg GLint xoffset, GLint yoffset, GLint zoffset, 2757117f1b4Smrg GLsizei width, GLsizei height, GLint depth, 2767117f1b4Smrg GLenum format, GLenum type, 2777117f1b4Smrg const GLvoid *pixels, 2787117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2797117f1b4Smrg struct gl_texture_object *texObj, 2807117f1b4Smrg struct gl_texture_image *texImage ); 2817117f1b4Smrg 2827117f1b4Smrg /** 2837117f1b4Smrg * Called by glGetTexImage(). 2847117f1b4Smrg */ 2857117f1b4Smrg void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level, 2867117f1b4Smrg GLenum format, GLenum type, GLvoid *pixels, 2877117f1b4Smrg struct gl_texture_object *texObj, 2887117f1b4Smrg struct gl_texture_image *texImage ); 2897117f1b4Smrg 2907117f1b4Smrg /** 2917117f1b4Smrg * Called by glCopyTexImage1D(). 2927117f1b4Smrg * 2937117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 2947117f1b4Smrg */ 2957117f1b4Smrg void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level, 2967117f1b4Smrg GLenum internalFormat, GLint x, GLint y, 2977117f1b4Smrg GLsizei width, GLint border ); 2987117f1b4Smrg 2997117f1b4Smrg /** 3007117f1b4Smrg * Called by glCopyTexImage2D(). 3017117f1b4Smrg * 3027117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3037117f1b4Smrg */ 3047117f1b4Smrg void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level, 3057117f1b4Smrg GLenum internalFormat, GLint x, GLint y, 3067117f1b4Smrg GLsizei width, GLsizei height, GLint border ); 3077117f1b4Smrg 3087117f1b4Smrg /** 3097117f1b4Smrg * Called by glCopyTexSubImage1D(). 3107117f1b4Smrg * 3117117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3127117f1b4Smrg */ 3137117f1b4Smrg void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, 3147117f1b4Smrg GLint xoffset, 3157117f1b4Smrg GLint x, GLint y, GLsizei width ); 3167117f1b4Smrg /** 3177117f1b4Smrg * Called by glCopyTexSubImage2D(). 3187117f1b4Smrg * 3197117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3207117f1b4Smrg */ 3217117f1b4Smrg void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, 3227117f1b4Smrg GLint xoffset, GLint yoffset, 3237117f1b4Smrg GLint x, GLint y, 3247117f1b4Smrg GLsizei width, GLsizei height ); 3257117f1b4Smrg /** 3267117f1b4Smrg * Called by glCopyTexSubImage3D(). 3277117f1b4Smrg * 3287117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3297117f1b4Smrg */ 3307117f1b4Smrg void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, 3317117f1b4Smrg GLint xoffset, GLint yoffset, GLint zoffset, 3327117f1b4Smrg GLint x, GLint y, 3337117f1b4Smrg GLsizei width, GLsizei height ); 3347117f1b4Smrg 335c1f859d4Smrg /** 336c1f859d4Smrg * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled. 337c1f859d4Smrg */ 338c1f859d4Smrg void (*GenerateMipmap)(GLcontext *ctx, GLenum target, 339c1f859d4Smrg struct gl_texture_object *texObj); 340c1f859d4Smrg 3417117f1b4Smrg /** 3427117f1b4Smrg * Called by glTexImage[123]D when user specifies a proxy texture 3437117f1b4Smrg * target. 3447117f1b4Smrg * 3457117f1b4Smrg * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails. 3467117f1b4Smrg */ 3477117f1b4Smrg GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target, 3487117f1b4Smrg GLint level, GLint internalFormat, 3497117f1b4Smrg GLenum format, GLenum type, 3507117f1b4Smrg GLint width, GLint height, 3517117f1b4Smrg GLint depth, GLint border); 3527117f1b4Smrg /*@}*/ 3537117f1b4Smrg 3547117f1b4Smrg 3557117f1b4Smrg /** 3567117f1b4Smrg * \name Compressed texture functions 3577117f1b4Smrg */ 3587117f1b4Smrg /*@{*/ 3597117f1b4Smrg 3607117f1b4Smrg /** 3617117f1b4Smrg * Called by glCompressedTexImage1D(). 3627117f1b4Smrg * 3637117f1b4Smrg * \param target user specified. 3647117f1b4Smrg * \param format user specified. 3657117f1b4Smrg * \param type user specified. 3667117f1b4Smrg * \param pixels user specified. 3677117f1b4Smrg * \param packing indicates the image packing of pixels. 3687117f1b4Smrg * \param texObj is the target texture object. 3697117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 3707117f1b4Smrg * width, \p height, \p depth, \p border and \p internalFormat information. 3717117f1b4Smrg * 3727117f1b4Smrg * \a retainInternalCopy is returned by this function and indicates whether 3737117f1b4Smrg * core Mesa should keep an internal copy of the texture image. 3747117f1b4Smrg */ 3757117f1b4Smrg void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target, 3767117f1b4Smrg GLint level, GLint internalFormat, 3777117f1b4Smrg GLsizei width, GLint border, 3787117f1b4Smrg GLsizei imageSize, const GLvoid *data, 3797117f1b4Smrg struct gl_texture_object *texObj, 3807117f1b4Smrg struct gl_texture_image *texImage ); 3817117f1b4Smrg /** 3827117f1b4Smrg * Called by glCompressedTexImage2D(). 3837117f1b4Smrg * 3847117f1b4Smrg * \sa dd_function_table::CompressedTexImage1D. 3857117f1b4Smrg */ 3867117f1b4Smrg void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target, 3877117f1b4Smrg GLint level, GLint internalFormat, 3887117f1b4Smrg GLsizei width, GLsizei height, GLint border, 3897117f1b4Smrg GLsizei imageSize, const GLvoid *data, 3907117f1b4Smrg struct gl_texture_object *texObj, 3917117f1b4Smrg struct gl_texture_image *texImage ); 3927117f1b4Smrg /** 3937117f1b4Smrg * Called by glCompressedTexImage3D(). 3947117f1b4Smrg * 3957117f1b4Smrg * \sa dd_function_table::CompressedTexImage3D. 3967117f1b4Smrg */ 3977117f1b4Smrg void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target, 3987117f1b4Smrg GLint level, GLint internalFormat, 3997117f1b4Smrg GLsizei width, GLsizei height, GLsizei depth, 4007117f1b4Smrg GLint border, 4017117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4027117f1b4Smrg struct gl_texture_object *texObj, 4037117f1b4Smrg struct gl_texture_image *texImage ); 4047117f1b4Smrg 4057117f1b4Smrg /** 4067117f1b4Smrg * Called by glCompressedTexSubImage1D(). 4077117f1b4Smrg * 4087117f1b4Smrg * \param target user specified. 4097117f1b4Smrg * \param level user specified. 4107117f1b4Smrg * \param xoffset user specified. 4117117f1b4Smrg * \param yoffset user specified. 4127117f1b4Smrg * \param zoffset user specified. 4137117f1b4Smrg * \param width user specified. 4147117f1b4Smrg * \param height user specified. 4157117f1b4Smrg * \param depth user specified. 4167117f1b4Smrg * \param imageSize user specified. 4177117f1b4Smrg * \param data user specified. 4187117f1b4Smrg * \param texObj is the target texture object. 4197117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 4207117f1b4Smrg * width, \p height, \p depth, \p border and \p internalFormat information. 4217117f1b4Smrg */ 4227117f1b4Smrg void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level, 4237117f1b4Smrg GLint xoffset, GLsizei width, 4247117f1b4Smrg GLenum format, 4257117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4267117f1b4Smrg struct gl_texture_object *texObj, 4277117f1b4Smrg struct gl_texture_image *texImage); 4287117f1b4Smrg /** 4297117f1b4Smrg * Called by glCompressedTexSubImage2D(). 4307117f1b4Smrg * 4317117f1b4Smrg * \sa dd_function_table::CompressedTexImage3D. 4327117f1b4Smrg */ 4337117f1b4Smrg void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level, 4347117f1b4Smrg GLint xoffset, GLint yoffset, 4357117f1b4Smrg GLsizei width, GLint height, 4367117f1b4Smrg GLenum format, 4377117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4387117f1b4Smrg struct gl_texture_object *texObj, 4397117f1b4Smrg struct gl_texture_image *texImage); 4407117f1b4Smrg /** 4417117f1b4Smrg * Called by glCompressedTexSubImage3D(). 4427117f1b4Smrg * 4437117f1b4Smrg * \sa dd_function_table::CompressedTexImage3D. 4447117f1b4Smrg */ 4457117f1b4Smrg void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level, 4467117f1b4Smrg GLint xoffset, GLint yoffset, GLint zoffset, 4477117f1b4Smrg GLsizei width, GLint height, GLint depth, 4487117f1b4Smrg GLenum format, 4497117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4507117f1b4Smrg struct gl_texture_object *texObj, 4517117f1b4Smrg struct gl_texture_image *texImage); 4527117f1b4Smrg 4537117f1b4Smrg 4547117f1b4Smrg /** 4557117f1b4Smrg * Called by glGetCompressedTexImage. 4567117f1b4Smrg */ 4577117f1b4Smrg void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level, 4587117f1b4Smrg GLvoid *img, 459c1f859d4Smrg struct gl_texture_object *texObj, 460c1f859d4Smrg struct gl_texture_image *texImage); 4617117f1b4Smrg 4627117f1b4Smrg /** 4637117f1b4Smrg * Called to query number of bytes of storage needed to store the 4647117f1b4Smrg * specified compressed texture. 4657117f1b4Smrg */ 4667117f1b4Smrg GLuint (*CompressedTextureSize)( GLcontext *ctx, GLsizei width, 4677117f1b4Smrg GLsizei height, GLsizei depth, 4687117f1b4Smrg GLenum format ); 4697117f1b4Smrg /*@}*/ 4707117f1b4Smrg 4717117f1b4Smrg /** 4727117f1b4Smrg * \name Texture object functions 4737117f1b4Smrg */ 4747117f1b4Smrg /*@{*/ 4757117f1b4Smrg 4767117f1b4Smrg /** 4777117f1b4Smrg * Called by glBindTexture(). 4787117f1b4Smrg */ 4797117f1b4Smrg void (*BindTexture)( GLcontext *ctx, GLenum target, 4807117f1b4Smrg struct gl_texture_object *tObj ); 4817117f1b4Smrg 4827117f1b4Smrg /** 4837117f1b4Smrg * Called to allocate a new texture object. 4847117f1b4Smrg * A new gl_texture_object should be returned. The driver should 4857117f1b4Smrg * attach to it any device-specific info it needs. 4867117f1b4Smrg */ 4877117f1b4Smrg struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name, 4887117f1b4Smrg GLenum target ); 4897117f1b4Smrg /** 4907117f1b4Smrg * Called when a texture object is about to be deallocated. 4917117f1b4Smrg * 4927117f1b4Smrg * Driver should delete the gl_texture_object object and anything 4937117f1b4Smrg * hanging off of it. 4947117f1b4Smrg */ 4957117f1b4Smrg void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); 4967117f1b4Smrg 4977117f1b4Smrg /** 4987117f1b4Smrg * Called to allocate a new texture image object. 4997117f1b4Smrg */ 5007117f1b4Smrg struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx ); 5017117f1b4Smrg 5027117f1b4Smrg /** 5037117f1b4Smrg * Called to free tImage->Data. 5047117f1b4Smrg */ 5057117f1b4Smrg void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage ); 5067117f1b4Smrg 5077117f1b4Smrg /** Map texture image data into user space */ 5087117f1b4Smrg void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); 5097117f1b4Smrg /** Unmap texture images from user space */ 5107117f1b4Smrg void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); 5117117f1b4Smrg 5127117f1b4Smrg /** 5137117f1b4Smrg * Note: no context argument. This function doesn't initially look 5147117f1b4Smrg * like it belongs here, except that the driver is the only entity 5157117f1b4Smrg * that knows for sure how the texture memory is allocated - via 5167117f1b4Smrg * the above callbacks. There is then an argument that the driver 5177117f1b4Smrg * knows what memcpy paths might be fast. Typically this is invoked with 5187117f1b4Smrg * 5197117f1b4Smrg * to -- a pointer into texture memory allocated by NewTextureImage() above. 5207117f1b4Smrg * from -- a pointer into client memory or a mesa temporary. 5217117f1b4Smrg * sz -- nr bytes to copy. 5227117f1b4Smrg */ 5237117f1b4Smrg void* (*TextureMemCpy)( void *to, const void *from, size_t sz ); 5247117f1b4Smrg 5257117f1b4Smrg /** 5267117f1b4Smrg * Called by glAreTextureResident(). 5277117f1b4Smrg */ 5287117f1b4Smrg GLboolean (*IsTextureResident)( GLcontext *ctx, 5297117f1b4Smrg struct gl_texture_object *t ); 5307117f1b4Smrg 5317117f1b4Smrg /** 5327117f1b4Smrg * Called by glPrioritizeTextures(). 5337117f1b4Smrg */ 5347117f1b4Smrg void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t, 5357117f1b4Smrg GLclampf priority ); 5367117f1b4Smrg 5377117f1b4Smrg /** 5387117f1b4Smrg * Called by glActiveTextureARB() to set current texture unit. 5397117f1b4Smrg */ 5407117f1b4Smrg void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); 5417117f1b4Smrg 5427117f1b4Smrg /** 5437117f1b4Smrg * Called when the texture's color lookup table is changed. 5447117f1b4Smrg * 5457117f1b4Smrg * If \p tObj is NULL then the shared texture palette 5467117f1b4Smrg * gl_texture_object::Palette is to be updated. 5477117f1b4Smrg */ 5487117f1b4Smrg void (*UpdateTexturePalette)( GLcontext *ctx, 5497117f1b4Smrg struct gl_texture_object *tObj ); 5507117f1b4Smrg /*@}*/ 5517117f1b4Smrg 5527117f1b4Smrg 5537117f1b4Smrg /** 5547117f1b4Smrg * \name Imaging functionality 5557117f1b4Smrg */ 5567117f1b4Smrg /*@{*/ 5577117f1b4Smrg void (*CopyColorTable)( GLcontext *ctx, 5587117f1b4Smrg GLenum target, GLenum internalformat, 5597117f1b4Smrg GLint x, GLint y, GLsizei width ); 5607117f1b4Smrg 5617117f1b4Smrg void (*CopyColorSubTable)( GLcontext *ctx, 5627117f1b4Smrg GLenum target, GLsizei start, 5637117f1b4Smrg GLint x, GLint y, GLsizei width ); 5647117f1b4Smrg 5657117f1b4Smrg void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target, 5667117f1b4Smrg GLenum internalFormat, 5677117f1b4Smrg GLint x, GLint y, GLsizei width ); 5687117f1b4Smrg 5697117f1b4Smrg void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target, 5707117f1b4Smrg GLenum internalFormat, 5717117f1b4Smrg GLint x, GLint y, 5727117f1b4Smrg GLsizei width, GLsizei height ); 5737117f1b4Smrg /*@}*/ 5747117f1b4Smrg 5757117f1b4Smrg 5767117f1b4Smrg /** 5777117f1b4Smrg * \name Vertex/fragment program functions 5787117f1b4Smrg */ 5797117f1b4Smrg /*@{*/ 5807117f1b4Smrg /** Bind a vertex/fragment program */ 5817117f1b4Smrg void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog); 5827117f1b4Smrg /** Allocate a new program */ 5837117f1b4Smrg struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id); 5847117f1b4Smrg /** Delete a program */ 5857117f1b4Smrg void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog); 5867117f1b4Smrg /** Notify driver that a program string has been specified. */ 5877117f1b4Smrg void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, 5887117f1b4Smrg struct gl_program *prog); 5897117f1b4Smrg /** Get value of a program register during program execution. */ 5907117f1b4Smrg void (*GetProgramRegister)(GLcontext *ctx, enum register_file file, 5917117f1b4Smrg GLuint index, GLfloat val[4]); 5927117f1b4Smrg 5937117f1b4Smrg /** Query if program can be loaded onto hardware */ 5947117f1b4Smrg GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, 5957117f1b4Smrg struct gl_program *prog); 5967117f1b4Smrg 5977117f1b4Smrg /*@}*/ 5987117f1b4Smrg 5997117f1b4Smrg 6007117f1b4Smrg /** 6017117f1b4Smrg * \name State-changing functions. 6027117f1b4Smrg * 6037117f1b4Smrg * \note drawing functions are above. 6047117f1b4Smrg * 6057117f1b4Smrg * These functions are called by their corresponding OpenGL API functions. 6067117f1b4Smrg * They are \e also called by the gl_PopAttrib() function!!! 6077117f1b4Smrg * May add more functions like these to the device driver in the future. 6087117f1b4Smrg */ 6097117f1b4Smrg /*@{*/ 6107117f1b4Smrg /** Specify the alpha test function */ 6117117f1b4Smrg void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref); 6127117f1b4Smrg /** Set the blend color */ 6137117f1b4Smrg void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); 6147117f1b4Smrg /** Set the blend equation */ 6157117f1b4Smrg void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA); 6167117f1b4Smrg /** Specify pixel arithmetic */ 6177117f1b4Smrg void (*BlendFuncSeparate)(GLcontext *ctx, 6187117f1b4Smrg GLenum sfactorRGB, GLenum dfactorRGB, 6197117f1b4Smrg GLenum sfactorA, GLenum dfactorA); 6207117f1b4Smrg /** Specify clear values for the color buffers */ 6217117f1b4Smrg void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); 6227117f1b4Smrg /** Specify the clear value for the depth buffer */ 6237117f1b4Smrg void (*ClearDepth)(GLcontext *ctx, GLclampd d); 6247117f1b4Smrg /** Specify the clear value for the color index buffers */ 6257117f1b4Smrg void (*ClearIndex)(GLcontext *ctx, GLuint index); 6267117f1b4Smrg /** Specify the clear value for the stencil buffer */ 6277117f1b4Smrg void (*ClearStencil)(GLcontext *ctx, GLint s); 6287117f1b4Smrg /** Specify a plane against which all geometry is clipped */ 6297117f1b4Smrg void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation ); 6307117f1b4Smrg /** Enable and disable writing of frame buffer color components */ 6317117f1b4Smrg void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, 6327117f1b4Smrg GLboolean bmask, GLboolean amask ); 6337117f1b4Smrg /** Cause a material color to track the current color */ 6347117f1b4Smrg void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); 6357117f1b4Smrg /** Specify whether front- or back-facing facets can be culled */ 6367117f1b4Smrg void (*CullFace)(GLcontext *ctx, GLenum mode); 6377117f1b4Smrg /** Define front- and back-facing polygons */ 6387117f1b4Smrg void (*FrontFace)(GLcontext *ctx, GLenum mode); 6397117f1b4Smrg /** Specify the value used for depth buffer comparisons */ 6407117f1b4Smrg void (*DepthFunc)(GLcontext *ctx, GLenum func); 6417117f1b4Smrg /** Enable or disable writing into the depth buffer */ 6427117f1b4Smrg void (*DepthMask)(GLcontext *ctx, GLboolean flag); 6437117f1b4Smrg /** Specify mapping of depth values from NDC to window coordinates */ 6447117f1b4Smrg void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval); 6457117f1b4Smrg /** Specify the current buffer for writing */ 6467117f1b4Smrg void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); 6477117f1b4Smrg /** Specify the buffers for writing for fragment programs*/ 6487117f1b4Smrg void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); 6497117f1b4Smrg /** Enable or disable server-side gl capabilities */ 6507117f1b4Smrg void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state); 6517117f1b4Smrg /** Specify fog parameters */ 6527117f1b4Smrg void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); 6537117f1b4Smrg /** Specify implementation-specific hints */ 6547117f1b4Smrg void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); 6557117f1b4Smrg /** Control the writing of individual bits in the color index buffers */ 6567117f1b4Smrg void (*IndexMask)(GLcontext *ctx, GLuint mask); 6577117f1b4Smrg /** Set light source parameters. 6587117f1b4Smrg * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already 6597117f1b4Smrg * been transformed to eye-space. 6607117f1b4Smrg */ 6617117f1b4Smrg void (*Lightfv)(GLcontext *ctx, GLenum light, 6627117f1b4Smrg GLenum pname, const GLfloat *params ); 6637117f1b4Smrg /** Set the lighting model parameters */ 6647117f1b4Smrg void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); 6657117f1b4Smrg /** Specify the line stipple pattern */ 6667117f1b4Smrg void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern ); 6677117f1b4Smrg /** Specify the width of rasterized lines */ 6687117f1b4Smrg void (*LineWidth)(GLcontext *ctx, GLfloat width); 6697117f1b4Smrg /** Specify a logical pixel operation for color index rendering */ 6707117f1b4Smrg void (*LogicOpcode)(GLcontext *ctx, GLenum opcode); 6717117f1b4Smrg void (*PointParameterfv)(GLcontext *ctx, GLenum pname, 6727117f1b4Smrg const GLfloat *params); 6737117f1b4Smrg /** Specify the diameter of rasterized points */ 6747117f1b4Smrg void (*PointSize)(GLcontext *ctx, GLfloat size); 6757117f1b4Smrg /** Select a polygon rasterization mode */ 6767117f1b4Smrg void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); 6777117f1b4Smrg /** Set the scale and units used to calculate depth values */ 6787117f1b4Smrg void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); 6797117f1b4Smrg /** Set the polygon stippling pattern */ 6807117f1b4Smrg void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); 6817117f1b4Smrg /* Specifies the current buffer for reading */ 6827117f1b4Smrg void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); 6837117f1b4Smrg /** Set rasterization mode */ 6847117f1b4Smrg void (*RenderMode)(GLcontext *ctx, GLenum mode ); 6857117f1b4Smrg /** Define the scissor box */ 6867117f1b4Smrg void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 6877117f1b4Smrg /** Select flat or smooth shading */ 6887117f1b4Smrg void (*ShadeModel)(GLcontext *ctx, GLenum mode); 6897117f1b4Smrg /** OpenGL 2.0 two-sided StencilFunc */ 6907117f1b4Smrg void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, 6917117f1b4Smrg GLint ref, GLuint mask); 6927117f1b4Smrg /** OpenGL 2.0 two-sided StencilMask */ 6937117f1b4Smrg void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); 6947117f1b4Smrg /** OpenGL 2.0 two-sided StencilOp */ 6957117f1b4Smrg void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, 6967117f1b4Smrg GLenum zfail, GLenum zpass); 6977117f1b4Smrg /** Control the generation of texture coordinates */ 6987117f1b4Smrg void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, 6997117f1b4Smrg const GLfloat *params); 7007117f1b4Smrg /** Set texture environment parameters */ 7017117f1b4Smrg void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, 7027117f1b4Smrg const GLfloat *param); 7037117f1b4Smrg /** Set texture parameters */ 7047117f1b4Smrg void (*TexParameter)(GLcontext *ctx, GLenum target, 7057117f1b4Smrg struct gl_texture_object *texObj, 7067117f1b4Smrg GLenum pname, const GLfloat *params); 7077117f1b4Smrg void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); 7087117f1b4Smrg /** Set the viewport */ 7097117f1b4Smrg void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 7107117f1b4Smrg /*@}*/ 7117117f1b4Smrg 7127117f1b4Smrg 7137117f1b4Smrg /** 7147117f1b4Smrg * \name Vertex array functions 7157117f1b4Smrg * 7167117f1b4Smrg * Called by the corresponding OpenGL functions. 7177117f1b4Smrg */ 7187117f1b4Smrg /*@{*/ 7197117f1b4Smrg void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type, 7207117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7217117f1b4Smrg void (*NormalPointer)(GLcontext *ctx, GLenum type, 7227117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7237117f1b4Smrg void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type, 7247117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7257117f1b4Smrg void (*FogCoordPointer)(GLcontext *ctx, GLenum type, 7267117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7277117f1b4Smrg void (*IndexPointer)(GLcontext *ctx, GLenum type, 7287117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7297117f1b4Smrg void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type, 7307117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7317117f1b4Smrg void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type, 7327117f1b4Smrg GLsizei stride, const GLvoid *ptr); 7337117f1b4Smrg void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr); 7347117f1b4Smrg void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size, 7357117f1b4Smrg GLenum type, GLsizei stride, const GLvoid *ptr); 7367117f1b4Smrg void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count ); 7377117f1b4Smrg void (*UnlockArraysEXT)( GLcontext *ctx ); 7387117f1b4Smrg /*@}*/ 7397117f1b4Smrg 7407117f1b4Smrg 7417117f1b4Smrg /** 7427117f1b4Smrg * \name State-query functions 7437117f1b4Smrg * 7447117f1b4Smrg * Return GL_TRUE if query was completed, GL_FALSE otherwise. 7457117f1b4Smrg */ 7467117f1b4Smrg /*@{*/ 7477117f1b4Smrg /** Return the value or values of a selected parameter */ 7487117f1b4Smrg GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result); 7497117f1b4Smrg /** Return the value or values of a selected parameter */ 7507117f1b4Smrg GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result); 7517117f1b4Smrg /** Return the value or values of a selected parameter */ 7527117f1b4Smrg GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result); 7537117f1b4Smrg /** Return the value or values of a selected parameter */ 7547117f1b4Smrg GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result); 7557117f1b4Smrg /** Return the value or values of a selected parameter */ 7567117f1b4Smrg GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result); 7577117f1b4Smrg /*@}*/ 7587117f1b4Smrg 7597117f1b4Smrg 7607117f1b4Smrg /** 7617117f1b4Smrg * \name Vertex/pixel buffer object functions 7627117f1b4Smrg */ 7637117f1b4Smrg#if FEATURE_ARB_vertex_buffer_object 7647117f1b4Smrg /*@{*/ 7657117f1b4Smrg void (*BindBuffer)( GLcontext *ctx, GLenum target, 7667117f1b4Smrg struct gl_buffer_object *obj ); 7677117f1b4Smrg 7687117f1b4Smrg struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer, 7697117f1b4Smrg GLenum target ); 7707117f1b4Smrg 7717117f1b4Smrg void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj ); 7727117f1b4Smrg 7737117f1b4Smrg void (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size, 7747117f1b4Smrg const GLvoid *data, GLenum usage, 7757117f1b4Smrg struct gl_buffer_object *obj ); 7767117f1b4Smrg 7777117f1b4Smrg void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset, 7787117f1b4Smrg GLsizeiptrARB size, const GLvoid *data, 7797117f1b4Smrg struct gl_buffer_object *obj ); 7807117f1b4Smrg 7817117f1b4Smrg void (*GetBufferSubData)( GLcontext *ctx, GLenum target, 7827117f1b4Smrg GLintptrARB offset, GLsizeiptrARB size, 7837117f1b4Smrg GLvoid *data, struct gl_buffer_object *obj ); 7847117f1b4Smrg 7857117f1b4Smrg void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access, 7867117f1b4Smrg struct gl_buffer_object *obj ); 7877117f1b4Smrg 7887117f1b4Smrg GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, 7897117f1b4Smrg struct gl_buffer_object *obj ); 7907117f1b4Smrg /*@}*/ 7917117f1b4Smrg#endif 7927117f1b4Smrg 7937117f1b4Smrg /** 7947117f1b4Smrg * \name Functions for GL_EXT_framebuffer_object 7957117f1b4Smrg */ 7967117f1b4Smrg#if FEATURE_EXT_framebuffer_object 7977117f1b4Smrg /*@{*/ 7987117f1b4Smrg struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name); 7997117f1b4Smrg struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name); 8007117f1b4Smrg void (*BindFramebuffer)(GLcontext *ctx, GLenum target, 801c1f859d4Smrg struct gl_framebuffer *fb, struct gl_framebuffer *fbread); 8027117f1b4Smrg void (*FramebufferRenderbuffer)(GLcontext *ctx, 8037117f1b4Smrg struct gl_framebuffer *fb, 8047117f1b4Smrg GLenum attachment, 8057117f1b4Smrg struct gl_renderbuffer *rb); 8067117f1b4Smrg void (*RenderTexture)(GLcontext *ctx, 8077117f1b4Smrg struct gl_framebuffer *fb, 8087117f1b4Smrg struct gl_renderbuffer_attachment *att); 8097117f1b4Smrg void (*FinishRenderTexture)(GLcontext *ctx, 8107117f1b4Smrg struct gl_renderbuffer_attachment *att); 8117117f1b4Smrg /*@}*/ 8127117f1b4Smrg#endif 8137117f1b4Smrg#if FEATURE_EXT_framebuffer_blit 8147117f1b4Smrg void (*BlitFramebuffer)(GLcontext *ctx, 8157117f1b4Smrg GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 8167117f1b4Smrg GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, 8177117f1b4Smrg GLbitfield mask, GLenum filter); 8187117f1b4Smrg#endif 8197117f1b4Smrg 8207117f1b4Smrg /** 8217117f1b4Smrg * \name Query objects 8227117f1b4Smrg */ 8237117f1b4Smrg /*@{*/ 8247117f1b4Smrg struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id); 825c1f859d4Smrg void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q); 826c1f859d4Smrg void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q); 827c1f859d4Smrg void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q); 828c1f859d4Smrg void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q); 829c1f859d4Smrg void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q); 8307117f1b4Smrg /*@}*/ 8317117f1b4Smrg 8327117f1b4Smrg 8337117f1b4Smrg /** 8347117f1b4Smrg * \name Vertex Array objects 8357117f1b4Smrg */ 8367117f1b4Smrg /*@{*/ 8377117f1b4Smrg struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id); 8387117f1b4Smrg void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj); 8397117f1b4Smrg void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj); 8407117f1b4Smrg /*@}*/ 8417117f1b4Smrg 8427117f1b4Smrg /** 8437117f1b4Smrg * \name GLSL-related functions (ARB extensions and OpenGL 2.x) 8447117f1b4Smrg */ 8457117f1b4Smrg /*@{*/ 8467117f1b4Smrg void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader); 8477117f1b4Smrg void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index, 8487117f1b4Smrg const GLcharARB *name); 8497117f1b4Smrg void (*CompileShader)(GLcontext *ctx, GLuint shader); 8507117f1b4Smrg GLuint (*CreateShader)(GLcontext *ctx, GLenum type); 8517117f1b4Smrg GLuint (*CreateProgram)(GLcontext *ctx); 8527117f1b4Smrg void (*DeleteProgram2)(GLcontext *ctx, GLuint program); 8537117f1b4Smrg void (*DeleteShader)(GLcontext *ctx, GLuint shader); 8547117f1b4Smrg void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader); 8557117f1b4Smrg void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index, 8567117f1b4Smrg GLsizei maxLength, GLsizei * length, GLint * size, 8577117f1b4Smrg GLenum * type, GLcharARB * name); 8587117f1b4Smrg void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index, 8597117f1b4Smrg GLsizei maxLength, GLsizei *length, GLint *size, 8607117f1b4Smrg GLenum *type, GLcharARB *name); 8617117f1b4Smrg void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount, 8627117f1b4Smrg GLsizei *count, GLuint *obj); 8637117f1b4Smrg GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program, 8647117f1b4Smrg const GLcharARB *name); 8657117f1b4Smrg GLuint (*GetHandle)(GLcontext *ctx, GLenum pname); 8667117f1b4Smrg void (*GetProgramiv)(GLcontext *ctx, GLuint program, 8677117f1b4Smrg GLenum pname, GLint *params); 8687117f1b4Smrg void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize, 8697117f1b4Smrg GLsizei *length, GLchar *infoLog); 8707117f1b4Smrg void (*GetShaderiv)(GLcontext *ctx, GLuint shader, 8717117f1b4Smrg GLenum pname, GLint *params); 8727117f1b4Smrg void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize, 8737117f1b4Smrg GLsizei *length, GLchar *infoLog); 8747117f1b4Smrg void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength, 8757117f1b4Smrg GLsizei *length, GLcharARB *sourceOut); 8767117f1b4Smrg void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location, 8777117f1b4Smrg GLfloat *params); 878c1f859d4Smrg void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location, 879c1f859d4Smrg GLint *params); 8807117f1b4Smrg GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program, 8817117f1b4Smrg const GLcharARB *name); 8827117f1b4Smrg GLboolean (*IsProgram)(GLcontext *ctx, GLuint name); 8837117f1b4Smrg GLboolean (*IsShader)(GLcontext *ctx, GLuint name); 8847117f1b4Smrg void (*LinkProgram)(GLcontext *ctx, GLuint program); 8857117f1b4Smrg void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source); 8867117f1b4Smrg void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count, 8877117f1b4Smrg const GLvoid *values, GLenum type); 8887117f1b4Smrg void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows, 8897117f1b4Smrg GLenum matrixType, GLint location, GLsizei count, 8907117f1b4Smrg GLboolean transpose, const GLfloat *values); 8917117f1b4Smrg void (*UseProgram)(GLcontext *ctx, GLuint program); 8927117f1b4Smrg void (*ValidateProgram)(GLcontext *ctx, GLuint program); 8937117f1b4Smrg /* XXX many more to come */ 8947117f1b4Smrg /*@}*/ 8957117f1b4Smrg 8967117f1b4Smrg 8977117f1b4Smrg /** 8987117f1b4Smrg * \name Support for multiple T&L engines 8997117f1b4Smrg */ 9007117f1b4Smrg /*@{*/ 9017117f1b4Smrg 9027117f1b4Smrg /** 9037117f1b4Smrg * Bitmask of state changes that require the current T&L module to be 9047117f1b4Smrg * validated, using ValidateTnlModule() below. 9057117f1b4Smrg */ 9067117f1b4Smrg GLuint NeedValidate; 9077117f1b4Smrg 9087117f1b4Smrg /** 9097117f1b4Smrg * Validate the current T&L module. 9107117f1b4Smrg * 9117117f1b4Smrg * This is called directly after UpdateState() when a state change that has 9127117f1b4Smrg * occurred matches the dd_function_table::NeedValidate bitmask above. This 9137117f1b4Smrg * ensures all computed values are up to date, thus allowing the driver to 9147117f1b4Smrg * decide if the current T&L module needs to be swapped out. 9157117f1b4Smrg * 9167117f1b4Smrg * This must be non-NULL if a driver installs a custom T&L module and sets 9177117f1b4Smrg * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise. 9187117f1b4Smrg */ 9197117f1b4Smrg void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state ); 9207117f1b4Smrg 9217117f1b4Smrg 922c1f859d4Smrg#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1) 923c1f859d4Smrg#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2) 924c1f859d4Smrg#define PRIM_UNKNOWN (GL_POLYGON+3) 9257117f1b4Smrg 9267117f1b4Smrg /** 9277117f1b4Smrg * Set by the driver-supplied T&L engine. 9287117f1b4Smrg * 9297117f1b4Smrg * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd(). 9307117f1b4Smrg */ 9317117f1b4Smrg GLuint CurrentExecPrimitive; 9327117f1b4Smrg 9337117f1b4Smrg /** 9347117f1b4Smrg * Current state of an in-progress compilation. 9357117f1b4Smrg * 9367117f1b4Smrg * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END, 9377117f1b4Smrg * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above. 9387117f1b4Smrg */ 9397117f1b4Smrg GLuint CurrentSavePrimitive; 9407117f1b4Smrg 9417117f1b4Smrg 9427117f1b4Smrg#define FLUSH_STORED_VERTICES 0x1 9437117f1b4Smrg#define FLUSH_UPDATE_CURRENT 0x2 9447117f1b4Smrg /** 9457117f1b4Smrg * Set by the driver-supplied T&L engine whenever vertices are buffered 9467117f1b4Smrg * between glBegin()/glEnd() objects or __GLcontextRec::Current is not 9477117f1b4Smrg * updated. 9487117f1b4Smrg * 9497117f1b4Smrg * The dd_function_table::FlushVertices call below may be used to resolve 9507117f1b4Smrg * these conditions. 9517117f1b4Smrg */ 9527117f1b4Smrg GLuint NeedFlush; 9537117f1b4Smrg GLuint SaveNeedFlush; 9547117f1b4Smrg 9557117f1b4Smrg /** 9567117f1b4Smrg * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if 9577117f1b4Smrg * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered 9587117f1b4Smrg * vertices, if FLUSH_UPDATE_CURRENT bit is set updates 9597117f1b4Smrg * __GLcontextRec::Current and gl_light_attrib::Material 9607117f1b4Smrg * 9617117f1b4Smrg * Note that the default T&L engine never clears the 9627117f1b4Smrg * FLUSH_UPDATE_CURRENT bit, even after performing the update. 9637117f1b4Smrg */ 9647117f1b4Smrg void (*FlushVertices)( GLcontext *ctx, GLuint flags ); 9657117f1b4Smrg void (*SaveFlushVertices)( GLcontext *ctx ); 9667117f1b4Smrg 9677117f1b4Smrg /** 9687117f1b4Smrg * Give the driver the opportunity to hook in its own vtxfmt for 9697117f1b4Smrg * compiling optimized display lists. This is called on each valid 9707117f1b4Smrg * glBegin() during list compilation. 9717117f1b4Smrg */ 9727117f1b4Smrg GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode ); 9737117f1b4Smrg 9747117f1b4Smrg /** 9757117f1b4Smrg * Notify driver that the special derived value _NeedEyeCoords has 9767117f1b4Smrg * changed. 9777117f1b4Smrg */ 9787117f1b4Smrg void (*LightingSpaceChange)( GLcontext *ctx ); 9797117f1b4Smrg 9807117f1b4Smrg /** 9817117f1b4Smrg * Called by glNewList(). 9827117f1b4Smrg * 9837117f1b4Smrg * Let the T&L component know what is going on with display lists 9847117f1b4Smrg * in time to make changes to dispatch tables, etc. 9857117f1b4Smrg */ 9867117f1b4Smrg void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode ); 9877117f1b4Smrg /** 9887117f1b4Smrg * Called by glEndList(). 9897117f1b4Smrg * 9907117f1b4Smrg * \sa dd_function_table::NewList. 9917117f1b4Smrg */ 9927117f1b4Smrg void (*EndList)( GLcontext *ctx ); 9937117f1b4Smrg 9947117f1b4Smrg /** 9957117f1b4Smrg * Called by glCallList(s). 9967117f1b4Smrg * 9977117f1b4Smrg * Notify the T&L component before and after calling a display list. 9987117f1b4Smrg */ 9997117f1b4Smrg void (*BeginCallList)( GLcontext *ctx, 10007117f1b4Smrg struct mesa_display_list *dlist ); 10017117f1b4Smrg /** 10027117f1b4Smrg * Called by glEndCallList(). 10037117f1b4Smrg * 10047117f1b4Smrg * \sa dd_function_table::BeginCallList. 10057117f1b4Smrg */ 10067117f1b4Smrg void (*EndCallList)( GLcontext *ctx ); 10077117f1b4Smrg 10087117f1b4Smrg}; 10097117f1b4Smrg 10107117f1b4Smrg 10117117f1b4Smrg/** 10127117f1b4Smrg * Transform/Clip/Lighting interface 10137117f1b4Smrg * 10147117f1b4Smrg * Drivers present a reduced set of the functions possible in 10157117f1b4Smrg * glBegin()/glEnd() objects. Core mesa provides translation stubs for the 10167117f1b4Smrg * remaining functions to map down to these entry points. 10177117f1b4Smrg * 10187117f1b4Smrg * These are the initial values to be installed into dispatch by 10197117f1b4Smrg * mesa. If the T&L driver wants to modify the dispatch table 10207117f1b4Smrg * while installed, it must do so itself. It would be possible for 10217117f1b4Smrg * the vertexformat to install it's own initial values for these 10227117f1b4Smrg * functions, but this way there is an obvious list of what is 10237117f1b4Smrg * expected of the driver. 10247117f1b4Smrg * 10257117f1b4Smrg * If the driver wants to hook in entry points other than those 10267117f1b4Smrg * listed, it must restore them to their original values in 10277117f1b4Smrg * the disable() callback, below. 10287117f1b4Smrg */ 10297117f1b4Smrgtypedef struct { 10307117f1b4Smrg /** 10317117f1b4Smrg * \name Vertex 10327117f1b4Smrg */ 10337117f1b4Smrg /*@{*/ 10347117f1b4Smrg void (GLAPIENTRYP ArrayElement)( GLint ); /* NOTE */ 10357117f1b4Smrg void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat ); 10367117f1b4Smrg void (GLAPIENTRYP Color3fv)( const GLfloat * ); 10377117f1b4Smrg void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 10387117f1b4Smrg void (GLAPIENTRYP Color4fv)( const GLfloat * ); 10397117f1b4Smrg void (GLAPIENTRYP EdgeFlag)( GLboolean ); 10407117f1b4Smrg void (GLAPIENTRYP EvalCoord1f)( GLfloat ); /* NOTE */ 10417117f1b4Smrg void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); /* NOTE */ 10427117f1b4Smrg void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */ 10437117f1b4Smrg void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); /* NOTE */ 10447117f1b4Smrg void (GLAPIENTRYP EvalPoint1)( GLint ); /* NOTE */ 10457117f1b4Smrg void (GLAPIENTRYP EvalPoint2)( GLint, GLint ); /* NOTE */ 10467117f1b4Smrg void (GLAPIENTRYP FogCoordfEXT)( GLfloat ); 10477117f1b4Smrg void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * ); 10487117f1b4Smrg void (GLAPIENTRYP Indexf)( GLfloat ); 10497117f1b4Smrg void (GLAPIENTRYP Indexfv)( const GLfloat * ); 10507117f1b4Smrg void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */ 10517117f1b4Smrg void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat ); 10527117f1b4Smrg void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * ); 10537117f1b4Smrg void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); 10547117f1b4Smrg void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * ); 10557117f1b4Smrg void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); 10567117f1b4Smrg void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * ); 10577117f1b4Smrg void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); 10587117f1b4Smrg void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * ); 10597117f1b4Smrg void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat ); 10607117f1b4Smrg void (GLAPIENTRYP Normal3fv)( const GLfloat * ); 10617117f1b4Smrg void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); 10627117f1b4Smrg void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * ); 10637117f1b4Smrg void (GLAPIENTRYP TexCoord1f)( GLfloat ); 10647117f1b4Smrg void (GLAPIENTRYP TexCoord1fv)( const GLfloat * ); 10657117f1b4Smrg void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat ); 10667117f1b4Smrg void (GLAPIENTRYP TexCoord2fv)( const GLfloat * ); 10677117f1b4Smrg void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat ); 10687117f1b4Smrg void (GLAPIENTRYP TexCoord3fv)( const GLfloat * ); 10697117f1b4Smrg void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 10707117f1b4Smrg void (GLAPIENTRYP TexCoord4fv)( const GLfloat * ); 10717117f1b4Smrg void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat ); 10727117f1b4Smrg void (GLAPIENTRYP Vertex2fv)( const GLfloat * ); 10737117f1b4Smrg void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat ); 10747117f1b4Smrg void (GLAPIENTRYP Vertex3fv)( const GLfloat * ); 10757117f1b4Smrg void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 10767117f1b4Smrg void (GLAPIENTRYP Vertex4fv)( const GLfloat * ); 10777117f1b4Smrg void (GLAPIENTRYP CallList)( GLuint ); /* NOTE */ 10787117f1b4Smrg void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); /* NOTE */ 10797117f1b4Smrg void (GLAPIENTRYP Begin)( GLenum ); 10807117f1b4Smrg void (GLAPIENTRYP End)( void ); 10817117f1b4Smrg /* GL_NV_vertex_program */ 10827117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x ); 10837117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); 10847117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); 10857117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); 10867117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 10877117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); 10887117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 10897117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); 10907117f1b4Smrg#if FEATURE_ARB_vertex_program 10917117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x ); 10927117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); 10937117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); 10947117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); 10957117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 10967117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); 10977117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 10987117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); 10997117f1b4Smrg#endif 11007117f1b4Smrg /*@}*/ 11017117f1b4Smrg 11027117f1b4Smrg /* 11037117f1b4Smrg */ 11047117f1b4Smrg void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); 11057117f1b4Smrg 11067117f1b4Smrg /** 11077117f1b4Smrg * \name Array 11087117f1b4Smrg */ 11097117f1b4Smrg /*@{*/ 11107117f1b4Smrg void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count ); 11117117f1b4Smrg void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type, 11127117f1b4Smrg const GLvoid *indices ); 11137117f1b4Smrg void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, 11147117f1b4Smrg GLuint end, GLsizei count, 11157117f1b4Smrg GLenum type, const GLvoid *indices ); 11167117f1b4Smrg /*@}*/ 11177117f1b4Smrg 11187117f1b4Smrg /** 11197117f1b4Smrg * \name Eval 11207117f1b4Smrg * 11217117f1b4Smrg * If you don't support eval, fallback to the default vertex format 11227117f1b4Smrg * on receiving an eval call and use the pipeline mechanism to 11237117f1b4Smrg * provide partial T&L acceleration. 11247117f1b4Smrg * 11257117f1b4Smrg * Mesa will provide a set of helper functions to do eval within 11267117f1b4Smrg * accelerated vertex formats, eventually... 11277117f1b4Smrg */ 11287117f1b4Smrg /*@{*/ 11297117f1b4Smrg void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); 11307117f1b4Smrg void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); 11317117f1b4Smrg /*@}*/ 11327117f1b4Smrg 11337117f1b4Smrg} GLvertexformat; 11347117f1b4Smrg 11357117f1b4Smrg 11367117f1b4Smrg#endif /* DD_INCLUDED */ 1137