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