dd.h revision 6b146214dc16b441376d8dcaba21bcc4256a2402
1a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block/** 2a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \file dd.h 3a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Device driver interfaces. 4a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 5a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 6a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block/* 7a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Mesa 3-D graphics library 8a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Version: 6.5.2 9a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 10a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 11a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 12a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Permission is hereby granted, free of charge, to any person obtaining a 13a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * copy of this software and associated documentation files (the "Software"), 14a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * to deal in the Software without restriction, including without limitation 15a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * the rights to use, copy, modify, merge, publish, distribute, sublicense, 16a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * and/or sell copies of the Software, and to permit persons to whom the 17a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Software is furnished to do so, subject to the following conditions: 18a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 19a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * The above copyright notice and this permission notice shall be included 20a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * in all copies or substantial portions of the Software. 21a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 22a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 25a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 29a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 30a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 31a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#ifndef DD_INCLUDED 32a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define DD_INCLUDED 33a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 34a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */ 35a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 36a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockstruct gl_pixelstore_attrib; 37a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockstruct mesa_display_list; 38a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 39a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block/** 40a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Device driver function table. 41a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Core Mesa uses these function pointers to call into device drivers. 42a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Most of these functions directly correspond to OpenGL state commands. 43a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Core Mesa will call these functions after error checking has been done 44a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * so that the drivers don't have to worry about error testing. 45a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 46a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Vertex transformation/clipping/lighting is patched into the T&L module. 47a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Rasterization functions are patched into the swrast module. 48a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 49a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Note: when new functions are added here, the drivers/common/driverfuncs.c 50a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * file should be updated too!!! 51a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 52a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockstruct dd_function_table { 53a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 54a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Return a string as needed by glGetString(). 55a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be 56a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * returned. 57a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 58e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke const GLubyte * (*GetString)( GLcontext *ctx, GLenum name ); 59e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 60e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** 61e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * Notify the driver after Mesa has made some internal state changes. 62e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * 63e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * This is in addition to any state change callbacks Mesa may already have 64e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * made. 65e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke */ 66e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*UpdateState)( GLcontext *ctx, GLbitfield new_state ); 67a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 68a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 69a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Get the width and height of the named buffer/window. 70a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 71a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Mesa uses this to determine when the driver's window size has changed. 72a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * XXX OBSOLETE: this function will be removed in the future. 73a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 74a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetBufferSize)( GLframebuffer *buffer, 75d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke GLuint *width, GLuint *height ); 76d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke 77a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 78a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Resize the given framebuffer to the given size. 79a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * XXX OBSOLETE: this function will be removed in the future. 80a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 81a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb, 82a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint width, GLuint height); 83a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 84a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 85a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called whenever an error is generated. 86a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * __GLcontextRec::ErrorValue contains the error value. 87a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 88e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*Error)( GLcontext *ctx ); 89a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 90a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 91a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * This is called whenever glFinish() is called. 92a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 93e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*Finish)( GLcontext *ctx ); 94e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 95a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 96a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * This is called whenever glFlush() is called. 97a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 98a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Flush)( GLcontext *ctx ); 99a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 100a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 101a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Clear the color/depth/stencil/accum buffer(s). 102a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param buffers a bitmask of BUFFER_BIT_* flags indicating which 103a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * renderbuffers need to be cleared. 104a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 105a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Clear)( GLcontext *ctx, GLbitfield buffers ); 106a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 107a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 108a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Execute glAccum command. 109a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 110a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value ); 111a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 112a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 113a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 114a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Execute glRasterPos, updating the ctx->Current.Raster fields 115a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 116a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] ); 117a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 118a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 119a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Image-related functions 120a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 121a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 122a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 123a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 124a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glDrawPixels(). 125a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \p unpack describes how to unpack the source image data. 126a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 127a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DrawPixels)( GLcontext *ctx, 128a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint x, GLint y, GLsizei width, GLsizei height, 129a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, 130a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *unpack, 131a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *pixels ); 132a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 133a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 134a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glReadPixels(). 135a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 136a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ReadPixels)( GLcontext *ctx, 137a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint x, GLint y, GLsizei width, GLsizei height, 138a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, 139a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *unpack, 140a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLvoid *dest ); 141a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 142a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 143a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCopyPixels(). 144a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 145a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy, 146a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height, 147a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint dstx, GLint dsty, GLenum type ); 148a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 149a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 150a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glBitmap(). 151a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 152a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Bitmap)( GLcontext *ctx, 153a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint x, GLint y, GLsizei width, GLsizei height, 154a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *unpack, 155a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLubyte *bitmap ); 156a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 157a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 158a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 159a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 160a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Texture image functions 161a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 162a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 163a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 164a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 165a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Choose texture format. 166a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 167a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback 168a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * functions. The driver should examine \p internalFormat and return a 169a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * pointer to an appropriate gl_texture_format. 170a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 171a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_texture_format *(*ChooseTextureFormat)( GLcontext *ctx, 172a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint internalFormat, GLenum srcFormat, GLenum srcType ); 173a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 174a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 175a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexImage1D(). 176a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 177a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param target user specified. 178a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param format user specified. 179a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param type user specified. 180a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param pixels user specified. 181a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param packing indicates the image packing of pixels. 182a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texObj is the target texture object. 183a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texImage is the target texture image. It will have the texture \p 184a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * width, \p height, \p depth, \p border and \p internalFormat information. 185a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 186a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \p retainInternalCopy is returned by this function and indicates whether 187a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * core Mesa should keep an internal copy of the texture image. 188a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 189a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers should call a fallback routine from texstore.c if needed. 190a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 191a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level, 192a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint internalFormat, 193a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint width, GLint border, 194a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, const GLvoid *pixels, 195a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *packing, 196a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 197a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 198a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 199a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 200a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexImage2D(). 201a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 202a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::TexImage1D. 203a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 204a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level, 205a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint internalFormat, 206a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint width, GLint height, GLint border, 207a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, const GLvoid *pixels, 208a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *packing, 209a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 210a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 211a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 212a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 213a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexImage3D(). 214a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 215a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::TexImage1D. 216a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 217a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level, 218a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint internalFormat, 219a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint width, GLint height, GLint depth, GLint border, 220a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, const GLvoid *pixels, 221a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *packing, 222a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 223a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 224a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 225a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 226a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexSubImage1D(). 227a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 228a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param target user specified. 229a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param level user specified. 230a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param xoffset user specified. 231a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param yoffset user specified. 232a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param zoffset user specified. 233a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param width user specified. 234a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param height user specified. 235a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param depth user specified. 236a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param format user specified. 237a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param type user specified. 238a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param pixels user specified. 239a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param packing indicates the image packing of pixels. 240a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texObj is the target texture object. 241a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texImage is the target texture image. It will have the texture \p 242a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * width, \p height, \p border and \p internalFormat information. 243a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 244a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * The driver should use a fallback routine from texstore.c if needed. 245a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 246a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, 247a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLsizei width, 248a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, 249a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *pixels, 250a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *packing, 251a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 252a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 253a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 254a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 255a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexSubImage2D(). 256a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 257a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::TexSubImage1D. 258a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 259a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, 260a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLint yoffset, 261a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height, 262a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, 263a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *pixels, 264a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *packing, 265a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 266a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 267a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 268a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 269a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexSubImage3D(). 270a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 271a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::TexSubImage1D. 272a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 273a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, 274a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLint yoffset, GLint zoffset, 275a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height, GLint depth, 276a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, 277a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *pixels, 278a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const struct gl_pixelstore_attrib *packing, 279a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 280a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 281a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 282a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 283a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glGetTexImage(). 284a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 285a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level, 286a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, GLvoid *pixels, 287a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 288a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 289a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 290a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 291a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCopyTexImage1D(). 292a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 293a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers should use a fallback routine from texstore.c if needed. 294a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 295a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level, 296a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum internalFormat, GLint x, GLint y, 297a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLint border ); 298a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 299a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 300a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCopyTexImage2D(). 301a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 302a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers should use a fallback routine from texstore.c if needed. 303a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 304a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level, 305a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum internalFormat, GLint x, GLint y, 306a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height, GLint border ); 307a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 308a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 309a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCopyTexSubImage1D(). 310a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 311a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers should use a fallback routine from texstore.c if needed. 312a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 313a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, 314a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, 315a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint x, GLint y, GLsizei width ); 316a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 317a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCopyTexSubImage2D(). 318a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 319a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers should use a fallback routine from texstore.c if needed. 320a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 321a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, 322a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLint yoffset, 323a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint x, GLint y, 324a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height ); 325a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 326a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCopyTexSubImage3D(). 327a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 328a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers should use a fallback routine from texstore.c if needed. 329a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 330a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, 331a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLint yoffset, GLint zoffset, 332a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint x, GLint y, 333a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height ); 334a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 335a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 336a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled. 337a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 338a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GenerateMipmap)(GLcontext *ctx, GLenum target, 339a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj); 340a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 341a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 342a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glTexImage[123]D when user specifies a proxy texture 343a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * target. 344a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 345a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails. 346a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 347a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target, 348a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint level, GLint internalFormat, 349a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, GLenum type, 350a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint width, GLint height, 351a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint depth, GLint border); 352a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 353a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 354a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 355a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 356a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Compressed texture functions 357a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 358a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 359a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 360a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 361a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCompressedTexImage1D(). 362a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 363a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param target user specified. 364a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param format user specified. 365a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param type user specified. 366a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param pixels user specified. 367a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param packing indicates the image packing of pixels. 368a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texObj is the target texture object. 369a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texImage is the target texture image. It will have the texture \p 370a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * width, \p height, \p depth, \p border and \p internalFormat information. 371a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 372a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \a retainInternalCopy is returned by this function and indicates whether 373a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * core Mesa should keep an internal copy of the texture image. 374a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 375a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target, 376a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint level, GLint internalFormat, 377a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLint border, 378a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei imageSize, const GLvoid *data, 379a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 380a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 381a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 382a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCompressedTexImage2D(). 383a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 384a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::CompressedTexImage1D. 385a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 386a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target, 387a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint level, GLint internalFormat, 388a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height, GLint border, 389a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei imageSize, const GLvoid *data, 390a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 391a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 392a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 393a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCompressedTexImage3D(). 394a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 395a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::CompressedTexImage3D. 396a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 397a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target, 398a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint level, GLint internalFormat, 399a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height, GLsizei depth, 400a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint border, 401a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei imageSize, const GLvoid *data, 402a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 403a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage ); 404a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 405a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 406a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCompressedTexSubImage1D(). 407a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 408a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param target user specified. 409a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param level user specified. 410a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param xoffset user specified. 411a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param yoffset user specified. 412a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param zoffset user specified. 413a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param width user specified. 414a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param height user specified. 415a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param depth user specified. 416a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param imageSize user specified. 417a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param data user specified. 418a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texObj is the target texture object. 419a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \param texImage is the target texture image. It will have the texture \p 420a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * width, \p height, \p depth, \p border and \p internalFormat information. 421a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 422a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level, 423a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLsizei width, 424a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, 425a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei imageSize, const GLvoid *data, 426a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 427a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage); 428a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 429a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCompressedTexSubImage2D(). 430a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 431a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::CompressedTexImage3D. 432a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 433a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level, 434a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLint yoffset, 435a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLint height, 436a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, 437a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei imageSize, const GLvoid *data, 438a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 439a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage); 440a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 441a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCompressedTexSubImage3D(). 442a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 443a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::CompressedTexImage3D. 444a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 445a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level, 446a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint xoffset, GLint yoffset, GLint zoffset, 447a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLint height, GLint depth, 448a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format, 449a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei imageSize, const GLvoid *data, 450a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 451a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage); 452a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 453a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 454a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 455a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glGetCompressedTexImage. 456a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 457a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level, 458a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLvoid *img, 459a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 460a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image *texImage); 461a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 462a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 463a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called to query number of bytes of storage needed to store the 464a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * specified compressed texture. 465a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 466a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint (*CompressedTextureSize)( GLcontext *ctx, GLsizei width, 467a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei height, GLsizei depth, 468a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum format ); 469a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 470a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 471a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 472a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Texture object functions 473a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 474a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 475a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 476a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 477a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glBindTexture(). 478a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 479a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BindTexture)( GLcontext *ctx, GLenum target, 480a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *tObj ); 481a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 482a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 483a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called to allocate a new texture object. 484a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * A new gl_texture_object should be returned. The driver should 485a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * attach to it any device-specific info it needs. 486a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 487a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name, 488a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum target ); 489a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 490a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called when a texture object is about to be deallocated. 491a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 492e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * Driver should delete the gl_texture_object object and anything 493e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * hanging off of it. 494a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 495a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); 496a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 497a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 498a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called to allocate a new texture image object. 499a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 500a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx ); 501a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 502a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 503a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called to free tImage->Data. 504a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 505e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage ); 506e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 507a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Map texture image data into user space */ 508a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); 509a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Unmap texture images from user space */ 510a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); 511a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 512a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 513e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * Note: no context argument. This function doesn't initially look 514e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * like it belongs here, except that the driver is the only entity 515a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * that knows for sure how the texture memory is allocated - via 516a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * the above callbacks. There is then an argument that the driver 517a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * knows what memcpy paths might be fast. Typically this is invoked with 518a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 519e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * to -- a pointer into texture memory allocated by NewTextureImage() above. 520e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * from -- a pointer into client memory or a mesa temporary. 521a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * sz -- nr bytes to copy. 522a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 523a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void* (*TextureMemCpy)( void *to, const void *from, size_t sz ); 524a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 525e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** 526e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * Called by glAreTextureResident(). 527a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 528e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLboolean (*IsTextureResident)( GLcontext *ctx, 529e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke struct gl_texture_object *t ); 530a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 531a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 532a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glPrioritizeTextures(). 533a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 534a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t, 535e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLclampf priority ); 536e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 537a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 538a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glActiveTextureARB() to set current texture unit. 539a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 540a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); 541e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 542e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** 543e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * Called when the texture's color lookup table is changed. 544e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * 545e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * If \p tObj is NULL then the shared texture palette 546e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * gl_texture_object::Palette is to be updated. 547e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke */ 548e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*UpdateTexturePalette)( GLcontext *ctx, 549e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke struct gl_texture_object *tObj ); 550e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /*@}*/ 551e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 552e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 553e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** 554e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * \name Imaging functionality 555e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke */ 556e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /*@{*/ 557e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*CopyColorTable)( GLcontext *ctx, 558e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLenum target, GLenum internalformat, 559e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLint x, GLint y, GLsizei width ); 560e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 561e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*CopyColorSubTable)( GLcontext *ctx, 562e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLenum target, GLsizei start, 563e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLint x, GLint y, GLsizei width ); 564e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 565e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target, 566e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLenum internalFormat, 567e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLint x, GLint y, GLsizei width ); 568e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 569e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target, 570e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLenum internalFormat, 571e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLint x, GLint y, 572a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei width, GLsizei height ); 573a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 574e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 575e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 576e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** 577e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * \name Vertex/fragment program functions 578e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke */ 579e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /*@{*/ 580e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** Bind a vertex/fragment program */ 581e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog); 582e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** Allocate a new program */ 583e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id); 584e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** Delete a program */ 585e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog); 586e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** Notify driver that a program string has been specified. */ 587e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, 588e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke struct gl_program *prog); 589e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** Get value of a program register during program execution. */ 590e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*GetProgramRegister)(GLcontext *ctx, enum register_file file, 591e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLuint index, GLfloat val[4]); 592e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 593e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** Query if program can be loaded onto hardware */ 594e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, 595e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke struct gl_program *prog); 596a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 597a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 598e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 599e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke 600a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 601a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name State-changing functions. 602a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 603a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \note drawing functions are above. 604a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 605a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * These functions are called by their corresponding OpenGL API functions. 606a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * They are \e also called by the gl_PopAttrib() function!!! 607a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * May add more functions like these to the device driver in the future. 608a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 609a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 610a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the alpha test function */ 611a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref); 612a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set the blend color */ 613a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); 614a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set the blend equation */ 615a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA); 616a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify pixel arithmetic */ 617a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BlendFuncSeparate)(GLcontext *ctx, 618a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum sfactorRGB, GLenum dfactorRGB, 619a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum sfactorA, GLenum dfactorA); 620a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify clear values for the color buffers */ 621a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); 622a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the clear value for the depth buffer */ 623a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ClearDepth)(GLcontext *ctx, GLclampd d); 624a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the clear value for the color index buffers */ 625a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ClearIndex)(GLcontext *ctx, GLuint index); 626a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the clear value for the stencil buffer */ 627a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ClearStencil)(GLcontext *ctx, GLint s); 628d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke /** Specify a plane against which all geometry is clipped */ 629a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation ); 630a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Enable and disable writing of frame buffer color components */ 631a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, 632a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean bmask, GLboolean amask ); 633a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Cause a material color to track the current color */ 634d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); 635d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block /** Specify whether front- or back-facing facets can be culled */ 636a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CullFace)(GLcontext *ctx, GLenum mode); 637d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block /** Define front- and back-facing polygons */ 638a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*FrontFace)(GLcontext *ctx, GLenum mode); 639a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the value used for depth buffer comparisons */ 640a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DepthFunc)(GLcontext *ctx, GLenum func); 641a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Enable or disable writing into the depth buffer */ 642a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DepthMask)(GLcontext *ctx, GLboolean flag); 643a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify mapping of depth values from NDC to window coordinates */ 644a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval); 645a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the current buffer for writing */ 646a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); 647a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the buffers for writing for fragment programs*/ 648a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); 649a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Enable or disable server-side gl capabilities */ 650a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state); 651a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify fog parameters */ 652a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); 653a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify implementation-specific hints */ 654a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); 655a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Control the writing of individual bits in the color index buffers */ 656a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*IndexMask)(GLcontext *ctx, GLuint mask); 657a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set light source parameters. 658a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already 659a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * been transformed to eye-space. 660a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 661a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Lightfv)(GLcontext *ctx, GLenum light, 662a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum pname, const GLfloat *params ); 663a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set the lighting model parameters */ 664a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); 665a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the line stipple pattern */ 666a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern ); 667a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify the width of rasterized lines */ 668a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LineWidth)(GLcontext *ctx, GLfloat width); 669a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Specify a logical pixel operation for color index rendering */ 670a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LogicOpcode)(GLcontext *ctx, GLenum opcode); 671d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke void (*PointParameterfv)(GLcontext *ctx, GLenum pname, 672d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke const GLfloat *params); 673d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke /** Specify the diameter of rasterized points */ 674d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke void (*PointSize)(GLcontext *ctx, GLfloat size); 675d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke /** Select a polygon rasterization mode */ 676d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); 677d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke /** Set the scale and units used to calculate depth values */ 678d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); 679d91b9f7d46489a9ee00f9cb415630299c76a502bLeon Clarke /** Set the polygon stippling pattern */ 680a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); 681a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /* Specifies the current buffer for reading */ 682a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); 683a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set rasterization mode */ 684a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*RenderMode)(GLcontext *ctx, GLenum mode ); 685a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Define the scissor box */ 686a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 687a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Select flat or smooth shading */ 688a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ShadeModel)(GLcontext *ctx, GLenum mode); 689a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** OpenGL 2.0 two-sided StencilFunc */ 690a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, 691a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint ref, GLuint mask); 692a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** OpenGL 2.0 two-sided StencilMask */ 693a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); 694a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** OpenGL 2.0 two-sided StencilOp */ 695a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, 696a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum zfail, GLenum zpass); 697a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Control the generation of texture coordinates */ 698a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, 699a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLfloat *params); 700a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set texture environment parameters */ 701a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, 702a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLfloat *param); 703a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set texture parameters */ 704a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexParameter)(GLcontext *ctx, GLenum target, 705a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_texture_object *texObj, 706a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum pname, const GLfloat *params); 707a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); 708a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Set the viewport */ 709a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 710a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 711a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 712a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 713a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 714a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Vertex array functions 715a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 716a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by the corresponding OpenGL functions. 717a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 718a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 719a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type, 720a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 721a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*NormalPointer)(GLcontext *ctx, GLenum type, 722a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 723a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type, 724a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 725a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*FogCoordPointer)(GLcontext *ctx, GLenum type, 726a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 727a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*IndexPointer)(GLcontext *ctx, GLenum type, 728a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 729a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type, 730a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 731a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type, 732a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei stride, const GLvoid *ptr); 733a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr); 734a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size, 735a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum type, GLsizei stride, const GLvoid *ptr); 736a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count ); 737a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*UnlockArraysEXT)( GLcontext *ctx ); 738a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 739a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 740a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 741a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 742a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name State-query functions 743a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 744a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Return GL_TRUE if query was completed, GL_FALSE otherwise. 745a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 746a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 747a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Return the value or values of a selected parameter */ 748a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result); 749a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Return the value or values of a selected parameter */ 750a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result); 751a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Return the value or values of a selected parameter */ 752a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result); 753a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Return the value or values of a selected parameter */ 754a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result); 755a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** Return the value or values of a selected parameter */ 756a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result); 757a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 758a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 759a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 760a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 761a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Vertex/pixel buffer object functions 762a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 763a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#if FEATURE_ARB_vertex_buffer_object 764a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 765a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BindBuffer)( GLcontext *ctx, GLenum target, 766a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_buffer_object *obj ); 767a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 768a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer, 769a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum target ); 770a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 771a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj ); 772a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 773a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size, 774a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *data, GLenum usage, 775a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_buffer_object *obj ); 776a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 777a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset, 778a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizeiptrARB size, const GLvoid *data, 779a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_buffer_object *obj ); 780a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 781a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetBufferSubData)( GLcontext *ctx, GLenum target, 782a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLintptrARB offset, GLsizeiptrARB size, 783a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLvoid *data, struct gl_buffer_object *obj ); 784a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 785a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access, 786a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_buffer_object *obj ); 787a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 788a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, 789a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_buffer_object *obj ); 790a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 791a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#endif 792a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 793a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 794a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Functions for GL_EXT_framebuffer_object 795a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 796a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#if FEATURE_EXT_framebuffer_object 797a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 798a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name); 799a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name); 800a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BindFramebuffer)(GLcontext *ctx, GLenum target, 801a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_framebuffer *fb, struct gl_framebuffer *fbread); 802a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*FramebufferRenderbuffer)(GLcontext *ctx, 803a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_framebuffer *fb, 804a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum attachment, 805a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_renderbuffer *rb); 806a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*RenderTexture)(GLcontext *ctx, 807a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_framebuffer *fb, 808a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_renderbuffer_attachment *att); 809a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*FinishRenderTexture)(GLcontext *ctx, 810a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_renderbuffer_attachment *att); 811a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 812a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#endif 813a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#if FEATURE_EXT_framebuffer_blit 814a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BlitFramebuffer)(GLcontext *ctx, 815a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 816a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, 817a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLbitfield mask, GLenum filter); 818a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#endif 819a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 820a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 821a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Query objects 822a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 823a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 824a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id); 825a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q); 826a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q); 827a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q); 828a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q); 829a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q); 830a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 831a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 832a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 833a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 834a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Vertex Array objects 835a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 836a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 837a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id); 838a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj); 839a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj); 840a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 841a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 842a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 843a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name GLSL-related functions (ARB extensions and OpenGL 2.x) 844a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 845a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 846a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader); 847a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index, 848a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLcharARB *name); 849a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*CompileShader)(GLcontext *ctx, GLuint shader); 850a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint (*CreateShader)(GLcontext *ctx, GLenum type); 851a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint (*CreateProgram)(GLcontext *ctx); 852a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DeleteProgram2)(GLcontext *ctx, GLuint program); 853a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DeleteShader)(GLcontext *ctx, GLuint shader); 854a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader); 855a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index, 856a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei maxLength, GLsizei * length, GLint * size, 857a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum * type, GLcharARB * name); 858a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index, 859a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei maxLength, GLsizei *length, GLint *size, 860a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum *type, GLcharARB *name); 861a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount, 862a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei *count, GLuint *obj); 863a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program, 864a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLcharARB *name); 865a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint (*GetHandle)(GLcontext *ctx, GLenum pname); 866a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetProgramiv)(GLcontext *ctx, GLuint program, 867a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum pname, GLint *params); 868a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize, 869a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei *length, GLchar *infoLog); 870a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetShaderiv)(GLcontext *ctx, GLuint shader, 871a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum pname, GLint *params); 872a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize, 873a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei *length, GLchar *infoLog); 874a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength, 875a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLsizei *length, GLcharARB *sourceOut); 876a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location, 877a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLfloat *params); 878a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location, 879a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint *params); 880a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program, 881a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLcharARB *name); 882a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*IsProgram)(GLcontext *ctx, GLuint name); 883a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*IsShader)(GLcontext *ctx, GLuint name); 884a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LinkProgram)(GLcontext *ctx, GLuint program); 885a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source); 886a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count, 887a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *values, GLenum type); 888a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows, 889a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum matrixType, GLint location, GLsizei count, 890a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean transpose, const GLfloat *values); 891a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*UseProgram)(GLcontext *ctx, GLuint program); 892a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ValidateProgram)(GLcontext *ctx, GLuint program); 893a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /* XXX many more to come */ 894a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 895a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 896a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 897a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 898a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Support for multiple T&L engines 899a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 900a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 901a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 902a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 903a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Bitmask of state changes that require the current T&L module to be 904a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * validated, using ValidateTnlModule() below. 905a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 906a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint NeedValidate; 907a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 908a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 909a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Validate the current T&L module. 910a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 911a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * This is called directly after UpdateState() when a state change that has 912a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * occurred matches the dd_function_table::NeedValidate bitmask above. This 913a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * ensures all computed values are up to date, thus allowing the driver to 914a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * decide if the current T&L module needs to be swapped out. 915a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 916a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * This must be non-NULL if a driver installs a custom T&L module and sets 917a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise. 918a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 919a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state ); 920a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 921a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 922a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define PRIM_OUTSIDE_BEGIN_END GL_POLYGON+1 923a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define PRIM_INSIDE_UNKNOWN_PRIM GL_POLYGON+2 924a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define PRIM_UNKNOWN GL_POLYGON+3 925a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 926a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 927a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Set by the driver-supplied T&L engine. 928a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 929a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd(). 930a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 931a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint CurrentExecPrimitive; 932a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 933a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 934a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Current state of an in-progress compilation. 935a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 936a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END, 937a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above. 938a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 939a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint CurrentSavePrimitive; 940a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 941a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 942a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define FLUSH_STORED_VERTICES 0x1 943a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#define FLUSH_UPDATE_CURRENT 0x2 944a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 945a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Set by the driver-supplied T&L engine whenever vertices are buffered 946a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * between glBegin()/glEnd() objects or __GLcontextRec::Current is not 947a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * updated. 948a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 949a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * The dd_function_table::FlushVertices call below may be used to resolve 950a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * these conditions. 951a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 952a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint NeedFlush; 953a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint SaveNeedFlush; 954a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 955a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 956a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if 957a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered 958a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * vertices, if FLUSH_UPDATE_CURRENT bit is set updates 959a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * __GLcontextRec::Current and gl_light_attrib::Material 960a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 961a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Note that the default T&L engine never clears the 962a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * FLUSH_UPDATE_CURRENT bit, even after performing the update. 963a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 964a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*FlushVertices)( GLcontext *ctx, GLuint flags ); 965a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*SaveFlushVertices)( GLcontext *ctx ); 966a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 967a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 968a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Give the driver the opportunity to hook in its own vtxfmt for 969a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * compiling optimized display lists. This is called on each valid 970a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * glBegin() during list compilation. 971a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 972a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode ); 973a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 974a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 975a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Notify driver that the special derived value _NeedEyeCoords has 976a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * changed. 977a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 978a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*LightingSpaceChange)( GLcontext *ctx ); 979a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 980a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 981a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glNewList(). 982a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 983a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Let the T&L component know what is going on with display lists 984a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * in time to make changes to dispatch tables, etc. 985a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 986a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode ); 987e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke /** 988e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * Called by glEndList(). 989e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * 990e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke * \sa dd_function_table::NewList. 991e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke */ 992e46be819fca9468a0cd4e74859ce0f778eb8ca60Leon Clarke void (*EndList)( GLcontext *ctx ); 993a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 994a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 995a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glCallList(s). 996a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 997a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Notify the T&L component before and after calling a display list. 998a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 999a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*BeginCallList)( GLcontext *ctx, 1000a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block struct mesa_display_list *dlist ); 1001a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 1002a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Called by glEndCallList(). 1003a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 1004a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \sa dd_function_table::BeginCallList. 1005a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 1006a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (*EndCallList)( GLcontext *ctx ); 1007a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1008a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block}; 1009a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1010a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1011a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block/** 1012a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Transform/Clip/Lighting interface 1013a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 1014a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Drivers present a reduced set of the functions possible in 1015a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * glBegin()/glEnd() objects. Core mesa provides translation stubs for the 1016a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * remaining functions to map down to these entry points. 1017a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 1018a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * These are the initial values to be installed into dispatch by 1019a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * mesa. If the T&L driver wants to modify the dispatch table 1020a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * while installed, it must do so itself. It would be possible for 1021a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * the vertexformat to install it's own initial values for these 1022a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * functions, but this way there is an obvious list of what is 1023a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * expected of the driver. 1024a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 1025a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * If the driver wants to hook in entry points other than those 1026a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * listed, it must restore them to their original values in 1027a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * the disable() callback, below. 1028a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 1029a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blocktypedef struct { 1030a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 1031a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Vertex 1032a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 1033a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 1034a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP ArrayElement)( GLint ); /* NOTE */ 1035a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat ); 1036a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Color3fv)( const GLfloat * ); 1037a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 1038a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Color4fv)( const GLfloat * ); 1039a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EdgeFlag)( GLboolean ); 1040a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalCoord1f)( GLfloat ); /* NOTE */ 1041a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); /* NOTE */ 1042a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */ 1043a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); /* NOTE */ 1044a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalPoint1)( GLint ); /* NOTE */ 1045a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalPoint2)( GLint, GLint ); /* NOTE */ 1046a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP FogCoordfEXT)( GLfloat ); 1047a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * ); 1048a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Indexf)( GLfloat ); 1049a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Indexfv)( const GLfloat * ); 1050a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */ 1051a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat ); 1052a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * ); 1053a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); 1054a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * ); 1055a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); 1056a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * ); 1057a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); 1058a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * ); 1059a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat ); 1060a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Normal3fv)( const GLfloat * ); 1061a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); 1062a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * ); 1063a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord1f)( GLfloat ); 1064a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord1fv)( const GLfloat * ); 1065a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat ); 1066a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord2fv)( const GLfloat * ); 1067a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat ); 1068a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord3fv)( const GLfloat * ); 1069a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 1070a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP TexCoord4fv)( const GLfloat * ); 1071a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat ); 1072a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Vertex2fv)( const GLfloat * ); 1073a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat ); 1074a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Vertex3fv)( const GLfloat * ); 1075a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 1076a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Vertex4fv)( const GLfloat * ); 1077a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP CallList)( GLuint ); /* NOTE */ 1078a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); /* NOTE */ 1079a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Begin)( GLenum ); 1080a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP End)( void ); 1081a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /* GL_NV_vertex_program */ 1082a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x ); 1083a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); 1084a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); 1085a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); 1086a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 1087a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); 1088a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 1089a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); 1090a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#if FEATURE_ARB_vertex_program 1091a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x ); 1092a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); 1093a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); 1094a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); 1095a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 1096a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); 1097a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 1098a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); 1099a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#endif 1100a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 1101a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1102a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /* 1103a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 1104a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); 1105a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1106a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 1107a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Array 1108a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 1109a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 1110a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count ); 1111a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type, 1112a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block const GLvoid *indices ); 1113a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, 1114a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLuint end, GLsizei count, 1115a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block GLenum type, const GLvoid *indices ); 1116a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 1117a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1118a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /** 1119a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * \name Eval 1120a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 1121a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * If you don't support eval, fallback to the default vertex format 1122a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * on receiving an eval call and use the pipeline mechanism to 1123a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * provide partial T&L acceleration. 1124a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * 1125a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * Mesa will provide a set of helper functions to do eval within 1126a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block * accelerated vertex formats, eventually... 1127a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block */ 1128a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@{*/ 1129a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); 1130a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); 1131a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block /*@}*/ 1132d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block 1133d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block} GLvertexformat; 1134d0582a6c46733687d045e4188a1bcd0123c758a1Steve Block 1135a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block 1136a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block#endif /* DD_INCLUDED */ 1137a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block