3 * Device driver interfaces.
7 * Mesa 3-D graphics library
10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
38 struct gl_buffer_object
;
40 struct gl_display_list
;
41 struct gl_framebuffer
;
42 struct gl_pixelstore_attrib
;
44 struct gl_renderbuffer
;
45 struct gl_renderbuffer_attachment
;
47 struct gl_shader_program
;
48 struct gl_texture_image
;
49 struct gl_texture_object
;
51 /* GL_ARB_vertex_buffer_object */
52 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
53 * NULL) if buffer is unavailable for immediate mapping.
55 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
56 * would require more book-keeping in the driver than seems necessary
59 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
60 * want to provoke the driver to throw away the old storage, we will
61 * respect the contents of already referenced data.
63 #define MESA_MAP_NOWAIT_BIT 0x0040
67 * Device driver function table.
68 * Core Mesa uses these function pointers to call into device drivers.
69 * Most of these functions directly correspond to OpenGL state commands.
70 * Core Mesa will call these functions after error checking has been done
71 * so that the drivers don't have to worry about error testing.
73 * Vertex transformation/clipping/lighting is patched into the T&L module.
74 * Rasterization functions are patched into the swrast module.
76 * Note: when new functions are added here, the drivers/common/driverfuncs.c
77 * file should be updated too!!!
79 struct dd_function_table
{
81 * Return a string as needed by glGetString().
82 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
85 const GLubyte
* (*GetString
)( struct gl_context
*ctx
, GLenum name
);
88 * Notify the driver after Mesa has made some internal state changes.
90 * This is in addition to any state change callbacks Mesa may already have
93 void (*UpdateState
)( struct gl_context
*ctx
, GLbitfield new_state
);
96 * Get the width and height of the named buffer/window.
98 * Mesa uses this to determine when the driver's window size has changed.
99 * XXX OBSOLETE: this function will be removed in the future.
101 void (*GetBufferSize
)( struct gl_framebuffer
*buffer
,
102 GLuint
*width
, GLuint
*height
);
105 * Resize the given framebuffer to the given size.
106 * XXX OBSOLETE: this function will be removed in the future.
108 void (*ResizeBuffers
)( struct gl_context
*ctx
, struct gl_framebuffer
*fb
,
109 GLuint width
, GLuint height
);
112 * Called whenever an error is generated.
113 * __struct gl_contextRec::ErrorValue contains the error value.
115 void (*Error
)( struct gl_context
*ctx
);
118 * This is called whenever glFinish() is called.
120 void (*Finish
)( struct gl_context
*ctx
);
123 * This is called whenever glFlush() is called.
125 void (*Flush
)( struct gl_context
*ctx
);
128 * Clear the color/depth/stencil/accum buffer(s).
129 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
130 * renderbuffers need to be cleared.
132 void (*Clear
)( struct gl_context
*ctx
, GLbitfield buffers
);
135 * Execute glAccum command.
137 void (*Accum
)( struct gl_context
*ctx
, GLenum op
, GLfloat value
);
141 * Execute glRasterPos, updating the ctx->Current.Raster fields
143 void (*RasterPos
)( struct gl_context
*ctx
, const GLfloat v
[4] );
146 * \name Image-related functions
151 * Called by glDrawPixels().
152 * \p unpack describes how to unpack the source image data.
154 void (*DrawPixels
)( struct gl_context
*ctx
,
155 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
156 GLenum format
, GLenum type
,
157 const struct gl_pixelstore_attrib
*unpack
,
158 const GLvoid
*pixels
);
161 * Called by glReadPixels().
163 void (*ReadPixels
)( struct gl_context
*ctx
,
164 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
165 GLenum format
, GLenum type
,
166 const struct gl_pixelstore_attrib
*unpack
,
170 * Called by glCopyPixels().
172 void (*CopyPixels
)( struct gl_context
*ctx
, GLint srcx
, GLint srcy
,
173 GLsizei width
, GLsizei height
,
174 GLint dstx
, GLint dsty
, GLenum type
);
177 * Called by glBitmap().
179 void (*Bitmap
)( struct gl_context
*ctx
,
180 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
181 const struct gl_pixelstore_attrib
*unpack
,
182 const GLubyte
*bitmap
);
187 * \name Texture image functions
192 * Choose texture format.
194 * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
195 * functions. The driver should examine \p internalFormat and return a
198 GLuint (*ChooseTextureFormat
)( struct gl_context
*ctx
, GLint internalFormat
,
199 GLenum srcFormat
, GLenum srcType
);
202 * Called by glTexImage1D().
204 * \param target user specified.
205 * \param format user specified.
206 * \param type user specified.
207 * \param pixels user specified.
208 * \param packing indicates the image packing of pixels.
209 * \param texObj is the target texture object.
210 * \param texImage is the target texture image. It will have the texture \p
211 * width, \p height, \p depth, \p border and \p internalFormat information.
213 * \p retainInternalCopy is returned by this function and indicates whether
214 * core Mesa should keep an internal copy of the texture image.
216 * Drivers should call a fallback routine from texstore.c if needed.
218 void (*TexImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
219 GLint internalFormat
,
220 GLint width
, GLint border
,
221 GLenum format
, GLenum type
, const GLvoid
*pixels
,
222 const struct gl_pixelstore_attrib
*packing
,
223 struct gl_texture_object
*texObj
,
224 struct gl_texture_image
*texImage
);
227 * Called by glTexImage2D().
229 * \sa dd_function_table::TexImage1D.
231 void (*TexImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
232 GLint internalFormat
,
233 GLint width
, GLint height
, GLint border
,
234 GLenum format
, GLenum type
, const GLvoid
*pixels
,
235 const struct gl_pixelstore_attrib
*packing
,
236 struct gl_texture_object
*texObj
,
237 struct gl_texture_image
*texImage
);
240 * Called by glTexImage3D().
242 * \sa dd_function_table::TexImage1D.
244 void (*TexImage3D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
245 GLint internalFormat
,
246 GLint width
, GLint height
, GLint depth
, GLint border
,
247 GLenum format
, GLenum type
, const GLvoid
*pixels
,
248 const struct gl_pixelstore_attrib
*packing
,
249 struct gl_texture_object
*texObj
,
250 struct gl_texture_image
*texImage
);
253 * Called by glTexSubImage1D().
255 * \param target user specified.
256 * \param level user specified.
257 * \param xoffset user specified.
258 * \param yoffset user specified.
259 * \param zoffset user specified.
260 * \param width user specified.
261 * \param height user specified.
262 * \param depth user specified.
263 * \param format user specified.
264 * \param type user specified.
265 * \param pixels user specified.
266 * \param packing indicates the image packing of pixels.
267 * \param texObj is the target texture object.
268 * \param texImage is the target texture image. It will have the texture \p
269 * width, \p height, \p border and \p internalFormat information.
271 * The driver should use a fallback routine from texstore.c if needed.
273 void (*TexSubImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
274 GLint xoffset
, GLsizei width
,
275 GLenum format
, GLenum type
,
276 const GLvoid
*pixels
,
277 const struct gl_pixelstore_attrib
*packing
,
278 struct gl_texture_object
*texObj
,
279 struct gl_texture_image
*texImage
);
282 * Called by glTexSubImage2D().
284 * \sa dd_function_table::TexSubImage1D.
286 void (*TexSubImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
287 GLint xoffset
, GLint yoffset
,
288 GLsizei width
, GLsizei height
,
289 GLenum format
, GLenum type
,
290 const GLvoid
*pixels
,
291 const struct gl_pixelstore_attrib
*packing
,
292 struct gl_texture_object
*texObj
,
293 struct gl_texture_image
*texImage
);
296 * Called by glTexSubImage3D().
298 * \sa dd_function_table::TexSubImage1D.
300 void (*TexSubImage3D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
301 GLint xoffset
, GLint yoffset
, GLint zoffset
,
302 GLsizei width
, GLsizei height
, GLint depth
,
303 GLenum format
, GLenum type
,
304 const GLvoid
*pixels
,
305 const struct gl_pixelstore_attrib
*packing
,
306 struct gl_texture_object
*texObj
,
307 struct gl_texture_image
*texImage
);
310 * Called by glGetTexImage().
312 void (*GetTexImage
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
313 GLenum format
, GLenum type
, GLvoid
*pixels
,
314 struct gl_texture_object
*texObj
,
315 struct gl_texture_image
*texImage
);
318 * Called by glCopyTexImage1D().
320 * Drivers should use a fallback routine from texstore.c if needed.
322 void (*CopyTexImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
323 GLenum internalFormat
, GLint x
, GLint y
,
324 GLsizei width
, GLint border
);
327 * Called by glCopyTexImage2D().
329 * Drivers should use a fallback routine from texstore.c if needed.
331 void (*CopyTexImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
332 GLenum internalFormat
, GLint x
, GLint y
,
333 GLsizei width
, GLsizei height
, GLint border
);
336 * Called by glCopyTexSubImage1D().
338 * Drivers should use a fallback routine from texstore.c if needed.
340 void (*CopyTexSubImage1D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
342 GLint x
, GLint y
, GLsizei width
);
344 * Called by glCopyTexSubImage2D().
346 * Drivers should use a fallback routine from texstore.c if needed.
348 void (*CopyTexSubImage2D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
349 GLint xoffset
, GLint yoffset
,
351 GLsizei width
, GLsizei height
);
353 * Called by glCopyTexSubImage3D().
355 * Drivers should use a fallback routine from texstore.c if needed.
357 void (*CopyTexSubImage3D
)( struct gl_context
*ctx
, GLenum target
, GLint level
,
358 GLint xoffset
, GLint yoffset
, GLint zoffset
,
360 GLsizei width
, GLsizei height
);
363 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
365 void (*GenerateMipmap
)(struct gl_context
*ctx
, GLenum target
,
366 struct gl_texture_object
*texObj
);
369 * Called by glTexImage[123]D when user specifies a proxy texture
372 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
374 GLboolean (*TestProxyTexImage
)(struct gl_context
*ctx
, GLenum target
,
375 GLint level
, GLint internalFormat
,
376 GLenum format
, GLenum type
,
377 GLint width
, GLint height
,
378 GLint depth
, GLint border
);
383 * \name Compressed texture functions
388 * Called by glCompressedTexImage1D().
390 * \param target user specified.
391 * \param format user specified.
392 * \param type user specified.
393 * \param pixels user specified.
394 * \param packing indicates the image packing of pixels.
395 * \param texObj is the target texture object.
396 * \param texImage is the target texture image. It will have the texture \p
397 * width, \p height, \p depth, \p border and \p internalFormat information.
399 * \a retainInternalCopy is returned by this function and indicates whether
400 * core Mesa should keep an internal copy of the texture image.
402 void (*CompressedTexImage1D
)( struct gl_context
*ctx
, GLenum target
,
403 GLint level
, GLint internalFormat
,
404 GLsizei width
, GLint border
,
405 GLsizei imageSize
, const GLvoid
*data
,
406 struct gl_texture_object
*texObj
,
407 struct gl_texture_image
*texImage
);
409 * Called by glCompressedTexImage2D().
411 * \sa dd_function_table::CompressedTexImage1D.
413 void (*CompressedTexImage2D
)( struct gl_context
*ctx
, GLenum target
,
414 GLint level
, GLint internalFormat
,
415 GLsizei width
, GLsizei height
, GLint border
,
416 GLsizei imageSize
, const GLvoid
*data
,
417 struct gl_texture_object
*texObj
,
418 struct gl_texture_image
*texImage
);
420 * Called by glCompressedTexImage3D().
422 * \sa dd_function_table::CompressedTexImage3D.
424 void (*CompressedTexImage3D
)( struct gl_context
*ctx
, GLenum target
,
425 GLint level
, GLint internalFormat
,
426 GLsizei width
, GLsizei height
, GLsizei depth
,
428 GLsizei imageSize
, const GLvoid
*data
,
429 struct gl_texture_object
*texObj
,
430 struct gl_texture_image
*texImage
);
433 * Called by glCompressedTexSubImage1D().
435 * \param target user specified.
436 * \param level user specified.
437 * \param xoffset user specified.
438 * \param yoffset user specified.
439 * \param zoffset user specified.
440 * \param width user specified.
441 * \param height user specified.
442 * \param depth user specified.
443 * \param imageSize user specified.
444 * \param data user specified.
445 * \param texObj is the target texture object.
446 * \param texImage is the target texture image. It will have the texture \p
447 * width, \p height, \p depth, \p border and \p internalFormat information.
449 void (*CompressedTexSubImage1D
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
450 GLint xoffset
, GLsizei width
,
452 GLsizei imageSize
, const GLvoid
*data
,
453 struct gl_texture_object
*texObj
,
454 struct gl_texture_image
*texImage
);
456 * Called by glCompressedTexSubImage2D().
458 * \sa dd_function_table::CompressedTexImage3D.
460 void (*CompressedTexSubImage2D
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
461 GLint xoffset
, GLint yoffset
,
462 GLsizei width
, GLint height
,
464 GLsizei imageSize
, const GLvoid
*data
,
465 struct gl_texture_object
*texObj
,
466 struct gl_texture_image
*texImage
);
468 * Called by glCompressedTexSubImage3D().
470 * \sa dd_function_table::CompressedTexImage3D.
472 void (*CompressedTexSubImage3D
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
473 GLint xoffset
, GLint yoffset
, GLint zoffset
,
474 GLsizei width
, GLint height
, GLint depth
,
476 GLsizei imageSize
, const GLvoid
*data
,
477 struct gl_texture_object
*texObj
,
478 struct gl_texture_image
*texImage
);
482 * Called by glGetCompressedTexImage.
484 void (*GetCompressedTexImage
)(struct gl_context
*ctx
, GLenum target
, GLint level
,
486 struct gl_texture_object
*texObj
,
487 struct gl_texture_image
*texImage
);
492 * \name Texture object functions
497 * Called by glBindTexture().
499 void (*BindTexture
)( struct gl_context
*ctx
, GLenum target
,
500 struct gl_texture_object
*tObj
);
503 * Called to allocate a new texture object.
504 * A new gl_texture_object should be returned. The driver should
505 * attach to it any device-specific info it needs.
507 struct gl_texture_object
* (*NewTextureObject
)( struct gl_context
*ctx
, GLuint name
,
510 * Called when a texture object is about to be deallocated.
512 * Driver should delete the gl_texture_object object and anything
515 void (*DeleteTexture
)( struct gl_context
*ctx
, struct gl_texture_object
*tObj
);
518 * Called to allocate a new texture image object.
520 struct gl_texture_image
* (*NewTextureImage
)( struct gl_context
*ctx
);
523 * Called to free tImage->Data.
525 void (*FreeTexImageData
)( struct gl_context
*ctx
, struct gl_texture_image
*tImage
);
527 /** Map texture image data into user space */
528 void (*MapTexture
)( struct gl_context
*ctx
, struct gl_texture_object
*tObj
);
529 /** Unmap texture images from user space */
530 void (*UnmapTexture
)( struct gl_context
*ctx
, struct gl_texture_object
*tObj
);
533 * Note: no context argument. This function doesn't initially look
534 * like it belongs here, except that the driver is the only entity
535 * that knows for sure how the texture memory is allocated - via
536 * the above callbacks. There is then an argument that the driver
537 * knows what memcpy paths might be fast. Typically this is invoked with
539 * to -- a pointer into texture memory allocated by NewTextureImage() above.
540 * from -- a pointer into client memory or a mesa temporary.
541 * sz -- nr bytes to copy.
543 void* (*TextureMemCpy
)( void *to
, const void *from
, size_t sz
);
546 * Called by glAreTextureResident().
548 GLboolean (*IsTextureResident
)( struct gl_context
*ctx
,
549 struct gl_texture_object
*t
);
552 * Called when the texture's color lookup table is changed.
554 * If \p tObj is NULL then the shared texture palette
555 * gl_texture_object::Palette is to be updated.
557 void (*UpdateTexturePalette
)( struct gl_context
*ctx
,
558 struct gl_texture_object
*tObj
);
563 * \name Imaging functionality
566 void (*CopyColorTable
)( struct gl_context
*ctx
,
567 GLenum target
, GLenum internalformat
,
568 GLint x
, GLint y
, GLsizei width
);
570 void (*CopyColorSubTable
)( struct gl_context
*ctx
,
571 GLenum target
, GLsizei start
,
572 GLint x
, GLint y
, GLsizei width
);
577 * \name Vertex/fragment program functions
580 /** Bind a vertex/fragment program */
581 void (*BindProgram
)(struct gl_context
*ctx
, GLenum target
, struct gl_program
*prog
);
582 /** Allocate a new program */
583 struct gl_program
* (*NewProgram
)(struct gl_context
*ctx
, GLenum target
, GLuint id
);
584 /** Delete a program */
585 void (*DeleteProgram
)(struct gl_context
*ctx
, struct gl_program
*prog
);
587 * Notify driver that a program string (and GPU code) has been specified
588 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
589 * supported by the driver.
591 GLboolean (*ProgramStringNotify
)(struct gl_context
*ctx
, GLenum target
,
592 struct gl_program
*prog
);
594 /** Query if program can be loaded onto hardware */
595 GLboolean (*IsProgramNative
)(struct gl_context
*ctx
, GLenum target
,
596 struct gl_program
*prog
);
601 * \name GLSL shader/program functions.
605 * Called when a shader is compiled.
607 * Note that not all shader objects get ShaderCompile called on
608 * them. Notably, the shaders containing builtin functions do not
609 * have CompileShader() called, so if lowering passes are done they
610 * need to also be performed in LinkShader().
612 GLboolean (*CompileShader
)(struct gl_context
*ctx
, struct gl_shader
*shader
);
614 * Called when a shader program is linked.
616 * This gives drivers an opportunity to clone the IR and make their
617 * own transformations on it for the purposes of code generation.
619 GLboolean (*LinkShader
)(struct gl_context
*ctx
, struct gl_shader_program
*shader
);
623 * \name State-changing functions.
625 * \note drawing functions are above.
627 * These functions are called by their corresponding OpenGL API functions.
628 * They are \e also called by the gl_PopAttrib() function!!!
629 * May add more functions like these to the device driver in the future.
632 /** Specify the alpha test function */
633 void (*AlphaFunc
)(struct gl_context
*ctx
, GLenum func
, GLfloat ref
);
634 /** Set the blend color */
635 void (*BlendColor
)(struct gl_context
*ctx
, const GLfloat color
[4]);
636 /** Set the blend equation */
637 void (*BlendEquationSeparate
)(struct gl_context
*ctx
, GLenum modeRGB
, GLenum modeA
);
638 /** Specify pixel arithmetic */
639 void (*BlendFuncSeparate
)(struct gl_context
*ctx
,
640 GLenum sfactorRGB
, GLenum dfactorRGB
,
641 GLenum sfactorA
, GLenum dfactorA
);
642 /** Specify clear values for the color buffers */
643 void (*ClearColor
)(struct gl_context
*ctx
, const GLfloat color
[4]);
644 /** Specify the clear value for the depth buffer */
645 void (*ClearDepth
)(struct gl_context
*ctx
, GLclampd d
);
646 /** Specify the clear value for the stencil buffer */
647 void (*ClearStencil
)(struct gl_context
*ctx
, GLint s
);
648 /** Specify a plane against which all geometry is clipped */
649 void (*ClipPlane
)(struct gl_context
*ctx
, GLenum plane
, const GLfloat
*equation
);
650 /** Enable and disable writing of frame buffer color components */
651 void (*ColorMask
)(struct gl_context
*ctx
, GLboolean rmask
, GLboolean gmask
,
652 GLboolean bmask
, GLboolean amask
);
653 void (*ColorMaskIndexed
)(struct gl_context
*ctx
, GLuint buf
, GLboolean rmask
,
654 GLboolean gmask
, GLboolean bmask
, GLboolean amask
);
655 /** Cause a material color to track the current color */
656 void (*ColorMaterial
)(struct gl_context
*ctx
, GLenum face
, GLenum mode
);
657 /** Specify whether front- or back-facing facets can be culled */
658 void (*CullFace
)(struct gl_context
*ctx
, GLenum mode
);
659 /** Define front- and back-facing polygons */
660 void (*FrontFace
)(struct gl_context
*ctx
, GLenum mode
);
661 /** Specify the value used for depth buffer comparisons */
662 void (*DepthFunc
)(struct gl_context
*ctx
, GLenum func
);
663 /** Enable or disable writing into the depth buffer */
664 void (*DepthMask
)(struct gl_context
*ctx
, GLboolean flag
);
665 /** Specify mapping of depth values from NDC to window coordinates */
666 void (*DepthRange
)(struct gl_context
*ctx
, GLclampd nearval
, GLclampd farval
);
667 /** Specify the current buffer for writing */
668 void (*DrawBuffer
)( struct gl_context
*ctx
, GLenum buffer
);
669 /** Specify the buffers for writing for fragment programs*/
670 void (*DrawBuffers
)( struct gl_context
*ctx
, GLsizei n
, const GLenum
*buffers
);
671 /** Enable or disable server-side gl capabilities */
672 void (*Enable
)(struct gl_context
*ctx
, GLenum cap
, GLboolean state
);
673 /** Specify fog parameters */
674 void (*Fogfv
)(struct gl_context
*ctx
, GLenum pname
, const GLfloat
*params
);
675 /** Specify implementation-specific hints */
676 void (*Hint
)(struct gl_context
*ctx
, GLenum target
, GLenum mode
);
677 /** Set light source parameters.
678 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
679 * been transformed to eye-space.
681 void (*Lightfv
)(struct gl_context
*ctx
, GLenum light
,
682 GLenum pname
, const GLfloat
*params
);
683 /** Set the lighting model parameters */
684 void (*LightModelfv
)(struct gl_context
*ctx
, GLenum pname
, const GLfloat
*params
);
685 /** Specify the line stipple pattern */
686 void (*LineStipple
)(struct gl_context
*ctx
, GLint factor
, GLushort pattern
);
687 /** Specify the width of rasterized lines */
688 void (*LineWidth
)(struct gl_context
*ctx
, GLfloat width
);
689 /** Specify a logical pixel operation for color index rendering */
690 void (*LogicOpcode
)(struct gl_context
*ctx
, GLenum opcode
);
691 void (*PointParameterfv
)(struct gl_context
*ctx
, GLenum pname
,
692 const GLfloat
*params
);
693 /** Specify the diameter of rasterized points */
694 void (*PointSize
)(struct gl_context
*ctx
, GLfloat size
);
695 /** Select a polygon rasterization mode */
696 void (*PolygonMode
)(struct gl_context
*ctx
, GLenum face
, GLenum mode
);
697 /** Set the scale and units used to calculate depth values */
698 void (*PolygonOffset
)(struct gl_context
*ctx
, GLfloat factor
, GLfloat units
);
699 /** Set the polygon stippling pattern */
700 void (*PolygonStipple
)(struct gl_context
*ctx
, const GLubyte
*mask
);
701 /* Specifies the current buffer for reading */
702 void (*ReadBuffer
)( struct gl_context
*ctx
, GLenum buffer
);
703 /** Set rasterization mode */
704 void (*RenderMode
)(struct gl_context
*ctx
, GLenum mode
);
705 /** Define the scissor box */
706 void (*Scissor
)(struct gl_context
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
707 /** Select flat or smooth shading */
708 void (*ShadeModel
)(struct gl_context
*ctx
, GLenum mode
);
709 /** OpenGL 2.0 two-sided StencilFunc */
710 void (*StencilFuncSeparate
)(struct gl_context
*ctx
, GLenum face
, GLenum func
,
711 GLint ref
, GLuint mask
);
712 /** OpenGL 2.0 two-sided StencilMask */
713 void (*StencilMaskSeparate
)(struct gl_context
*ctx
, GLenum face
, GLuint mask
);
714 /** OpenGL 2.0 two-sided StencilOp */
715 void (*StencilOpSeparate
)(struct gl_context
*ctx
, GLenum face
, GLenum fail
,
716 GLenum zfail
, GLenum zpass
);
717 /** Control the generation of texture coordinates */
718 void (*TexGen
)(struct gl_context
*ctx
, GLenum coord
, GLenum pname
,
719 const GLfloat
*params
);
720 /** Set texture environment parameters */
721 void (*TexEnv
)(struct gl_context
*ctx
, GLenum target
, GLenum pname
,
722 const GLfloat
*param
);
723 /** Set texture parameters */
724 void (*TexParameter
)(struct gl_context
*ctx
, GLenum target
,
725 struct gl_texture_object
*texObj
,
726 GLenum pname
, const GLfloat
*params
);
727 /** Set the viewport */
728 void (*Viewport
)(struct gl_context
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
733 * \name Vertex/pixel buffer object functions
736 void (*BindBuffer
)( struct gl_context
*ctx
, GLenum target
,
737 struct gl_buffer_object
*obj
);
739 struct gl_buffer_object
* (*NewBufferObject
)( struct gl_context
*ctx
, GLuint buffer
,
742 void (*DeleteBuffer
)( struct gl_context
*ctx
, struct gl_buffer_object
*obj
);
744 GLboolean (*BufferData
)( struct gl_context
*ctx
, GLenum target
, GLsizeiptrARB size
,
745 const GLvoid
*data
, GLenum usage
,
746 struct gl_buffer_object
*obj
);
748 void (*BufferSubData
)( struct gl_context
*ctx
, GLenum target
, GLintptrARB offset
,
749 GLsizeiptrARB size
, const GLvoid
*data
,
750 struct gl_buffer_object
*obj
);
752 void (*GetBufferSubData
)( struct gl_context
*ctx
, GLenum target
,
753 GLintptrARB offset
, GLsizeiptrARB size
,
754 GLvoid
*data
, struct gl_buffer_object
*obj
);
756 void * (*MapBuffer
)( struct gl_context
*ctx
, GLenum target
, GLenum access
,
757 struct gl_buffer_object
*obj
);
759 void (*CopyBufferSubData
)( struct gl_context
*ctx
,
760 struct gl_buffer_object
*src
,
761 struct gl_buffer_object
*dst
,
762 GLintptr readOffset
, GLintptr writeOffset
,
765 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
767 void * (*MapBufferRange
)( struct gl_context
*ctx
, GLenum target
, GLintptr offset
,
768 GLsizeiptr length
, GLbitfield access
,
769 struct gl_buffer_object
*obj
);
771 void (*FlushMappedBufferRange
)(struct gl_context
*ctx
, GLenum target
,
772 GLintptr offset
, GLsizeiptr length
,
773 struct gl_buffer_object
*obj
);
775 GLboolean (*UnmapBuffer
)( struct gl_context
*ctx
, GLenum target
,
776 struct gl_buffer_object
*obj
);
780 * \name Functions for GL_APPLE_object_purgeable
783 /* variations on ObjectPurgeable */
784 GLenum (*BufferObjectPurgeable
)( struct gl_context
*ctx
, struct gl_buffer_object
*obj
, GLenum option
);
785 GLenum (*RenderObjectPurgeable
)( struct gl_context
*ctx
, struct gl_renderbuffer
*obj
, GLenum option
);
786 GLenum (*TextureObjectPurgeable
)( struct gl_context
*ctx
, struct gl_texture_object
*obj
, GLenum option
);
788 /* variations on ObjectUnpurgeable */
789 GLenum (*BufferObjectUnpurgeable
)( struct gl_context
*ctx
, struct gl_buffer_object
*obj
, GLenum option
);
790 GLenum (*RenderObjectUnpurgeable
)( struct gl_context
*ctx
, struct gl_renderbuffer
*obj
, GLenum option
);
791 GLenum (*TextureObjectUnpurgeable
)( struct gl_context
*ctx
, struct gl_texture_object
*obj
, GLenum option
);
795 * \name Functions for GL_EXT_framebuffer_{object,blit}.
798 struct gl_framebuffer
* (*NewFramebuffer
)(struct gl_context
*ctx
, GLuint name
);
799 struct gl_renderbuffer
* (*NewRenderbuffer
)(struct gl_context
*ctx
, GLuint name
);
800 void (*BindFramebuffer
)(struct gl_context
*ctx
, GLenum target
,
801 struct gl_framebuffer
*drawFb
,
802 struct gl_framebuffer
*readFb
);
803 void (*FramebufferRenderbuffer
)(struct gl_context
*ctx
,
804 struct gl_framebuffer
*fb
,
806 struct gl_renderbuffer
*rb
);
807 void (*RenderTexture
)(struct gl_context
*ctx
,
808 struct gl_framebuffer
*fb
,
809 struct gl_renderbuffer_attachment
*att
);
810 void (*FinishRenderTexture
)(struct gl_context
*ctx
,
811 struct gl_renderbuffer_attachment
*att
);
812 void (*ValidateFramebuffer
)(struct gl_context
*ctx
,
813 struct gl_framebuffer
*fb
);
815 void (*BlitFramebuffer
)(struct gl_context
*ctx
,
816 GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
817 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
,
818 GLbitfield mask
, GLenum filter
);
821 * \name Query objects
824 struct gl_query_object
* (*NewQueryObject
)(struct gl_context
*ctx
, GLuint id
);
825 void (*DeleteQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
826 void (*BeginQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
827 void (*EndQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
828 void (*CheckQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
829 void (*WaitQuery
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
834 * \name Vertex Array objects
837 struct gl_array_object
* (*NewArrayObject
)(struct gl_context
*ctx
, GLuint id
);
838 void (*DeleteArrayObject
)(struct gl_context
*ctx
, struct gl_array_object
*obj
);
839 void (*BindArrayObject
)(struct gl_context
*ctx
, struct gl_array_object
*obj
);
843 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
846 struct gl_shader
*(*NewShader
)(struct gl_context
*ctx
, GLuint name
, GLenum type
);
847 void (*DeleteShader
)(struct gl_context
*ctx
, struct gl_shader
*shader
);
848 struct gl_shader_program
*(*NewShaderProgram
)(struct gl_context
*ctx
, GLuint name
);
849 void (*DeleteShaderProgram
)(struct gl_context
*ctx
,
850 struct gl_shader_program
*shProg
);
851 void (*UseProgram
)(struct gl_context
*ctx
, struct gl_shader_program
*shProg
);
856 * \name Support for multiple T&L engines
861 * Bitmask of state changes that require the current T&L module to be
862 * validated, using ValidateTnlModule() below.
867 * Validate the current T&L module.
869 * This is called directly after UpdateState() when a state change that has
870 * occurred matches the dd_function_table::NeedValidate bitmask above. This
871 * ensures all computed values are up to date, thus allowing the driver to
872 * decide if the current T&L module needs to be swapped out.
874 * This must be non-NULL if a driver installs a custom T&L module and sets
875 * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
877 void (*ValidateTnlModule
)( struct gl_context
*ctx
, GLuint new_state
);
880 #define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
881 #define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
882 #define PRIM_UNKNOWN (GL_POLYGON+3)
885 * Set by the driver-supplied T&L engine.
887 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
889 GLuint CurrentExecPrimitive
;
892 * Current state of an in-progress compilation.
894 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
895 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
897 GLuint CurrentSavePrimitive
;
900 #define FLUSH_STORED_VERTICES 0x1
901 #define FLUSH_UPDATE_CURRENT 0x2
903 * Set by the driver-supplied T&L engine whenever vertices are buffered
904 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not
907 * The dd_function_table::FlushVertices call below may be used to resolve
911 GLuint SaveNeedFlush
;
914 /* Called prior to any of the GLvertexformat functions being
915 * called. Paired with Driver.FlushVertices().
917 void (*BeginVertices
)( struct gl_context
*ctx
);
920 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
921 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
922 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
923 * __struct gl_contextRec::Current and gl_light_attrib::Material
925 * Note that the default T&L engine never clears the
926 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
928 void (*FlushVertices
)( struct gl_context
*ctx
, GLuint flags
);
929 void (*SaveFlushVertices
)( struct gl_context
*ctx
);
932 * Give the driver the opportunity to hook in its own vtxfmt for
933 * compiling optimized display lists. This is called on each valid
934 * glBegin() during list compilation.
936 GLboolean (*NotifySaveBegin
)( struct gl_context
*ctx
, GLenum mode
);
939 * Notify driver that the special derived value _NeedEyeCoords has
942 void (*LightingSpaceChange
)( struct gl_context
*ctx
);
945 * Called by glNewList().
947 * Let the T&L component know what is going on with display lists
948 * in time to make changes to dispatch tables, etc.
950 void (*NewList
)( struct gl_context
*ctx
, GLuint list
, GLenum mode
);
952 * Called by glEndList().
954 * \sa dd_function_table::NewList.
956 void (*EndList
)( struct gl_context
*ctx
);
959 * Called by glCallList(s).
961 * Notify the T&L component before and after calling a display list.
963 void (*BeginCallList
)( struct gl_context
*ctx
,
964 struct gl_display_list
*dlist
);
966 * Called by glEndCallList().
968 * \sa dd_function_table::BeginCallList.
970 void (*EndCallList
)( struct gl_context
*ctx
);
974 * \name GL_ARB_sync interfaces
977 struct gl_sync_object
* (*NewSyncObject
)(struct gl_context
*, GLenum
);
978 void (*FenceSync
)(struct gl_context
*, struct gl_sync_object
*, GLenum
, GLbitfield
);
979 void (*DeleteSyncObject
)(struct gl_context
*, struct gl_sync_object
*);
980 void (*CheckSync
)(struct gl_context
*, struct gl_sync_object
*);
981 void (*ClientWaitSync
)(struct gl_context
*, struct gl_sync_object
*,
982 GLbitfield
, GLuint64
);
983 void (*ServerWaitSync
)(struct gl_context
*, struct gl_sync_object
*,
984 GLbitfield
, GLuint64
);
987 /** GL_NV_conditional_render */
988 void (*BeginConditionalRender
)(struct gl_context
*ctx
, struct gl_query_object
*q
,
990 void (*EndConditionalRender
)(struct gl_context
*ctx
, struct gl_query_object
*q
);
993 * \name GL_OES_draw_texture interface
996 void (*DrawTex
)(struct gl_context
*ctx
, GLfloat x
, GLfloat y
, GLfloat z
,
997 GLfloat width
, GLfloat height
);
1001 * \name GL_OES_EGL_image interface
1003 void (*EGLImageTargetTexture2D
)(struct gl_context
*ctx
, GLenum target
,
1004 struct gl_texture_object
*texObj
,
1005 struct gl_texture_image
*texImage
,
1006 GLeglImageOES image_handle
);
1007 void (*EGLImageTargetRenderbufferStorage
)(struct gl_context
*ctx
,
1008 struct gl_renderbuffer
*rb
,
1009 void *image_handle
);
1012 * \name GL_EXT_transform_feedback interface
1014 struct gl_transform_feedback_object
*
1015 (*NewTransformFeedback
)(struct gl_context
*ctx
, GLuint name
);
1016 void (*DeleteTransformFeedback
)(struct gl_context
*ctx
,
1017 struct gl_transform_feedback_object
*obj
);
1018 void (*BeginTransformFeedback
)(struct gl_context
*ctx
, GLenum mode
,
1019 struct gl_transform_feedback_object
*obj
);
1020 void (*EndTransformFeedback
)(struct gl_context
*ctx
,
1021 struct gl_transform_feedback_object
*obj
);
1022 void (*PauseTransformFeedback
)(struct gl_context
*ctx
,
1023 struct gl_transform_feedback_object
*obj
);
1024 void (*ResumeTransformFeedback
)(struct gl_context
*ctx
,
1025 struct gl_transform_feedback_object
*obj
);
1026 void (*DrawTransformFeedback
)(struct gl_context
*ctx
, GLenum mode
,
1027 struct gl_transform_feedback_object
*obj
);
1032 * Transform/Clip/Lighting interface
1034 * Drivers present a reduced set of the functions possible in
1035 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
1036 * remaining functions to map down to these entry points.
1038 * These are the initial values to be installed into dispatch by
1039 * mesa. If the T&L driver wants to modify the dispatch table
1040 * while installed, it must do so itself. It would be possible for
1041 * the vertexformat to install its own initial values for these
1042 * functions, but this way there is an obvious list of what is
1043 * expected of the driver.
1045 * If the driver wants to hook in entry points other than those
1046 * listed, it must restore them to their original values in
1047 * the disable() callback, below.
1054 void (GLAPIENTRYP ArrayElement
)( GLint
);
1055 void (GLAPIENTRYP Color3f
)( GLfloat
, GLfloat
, GLfloat
);
1056 void (GLAPIENTRYP Color3fv
)( const GLfloat
* );
1057 void (GLAPIENTRYP Color4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1058 void (GLAPIENTRYP Color4fv
)( const GLfloat
* );
1059 void (GLAPIENTRYP EdgeFlag
)( GLboolean
);
1060 void (GLAPIENTRYP EvalCoord1f
)( GLfloat
);
1061 void (GLAPIENTRYP EvalCoord1fv
)( const GLfloat
* );
1062 void (GLAPIENTRYP EvalCoord2f
)( GLfloat
, GLfloat
);
1063 void (GLAPIENTRYP EvalCoord2fv
)( const GLfloat
* );
1064 void (GLAPIENTRYP EvalPoint1
)( GLint
);
1065 void (GLAPIENTRYP EvalPoint2
)( GLint
, GLint
);
1066 void (GLAPIENTRYP FogCoordfEXT
)( GLfloat
);
1067 void (GLAPIENTRYP FogCoordfvEXT
)( const GLfloat
* );
1068 void (GLAPIENTRYP Indexf
)( GLfloat
);
1069 void (GLAPIENTRYP Indexfv
)( const GLfloat
* );
1070 void (GLAPIENTRYP Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
* );
1071 void (GLAPIENTRYP MultiTexCoord1fARB
)( GLenum
, GLfloat
);
1072 void (GLAPIENTRYP MultiTexCoord1fvARB
)( GLenum
, const GLfloat
* );
1073 void (GLAPIENTRYP MultiTexCoord2fARB
)( GLenum
, GLfloat
, GLfloat
);
1074 void (GLAPIENTRYP MultiTexCoord2fvARB
)( GLenum
, const GLfloat
* );
1075 void (GLAPIENTRYP MultiTexCoord3fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
);
1076 void (GLAPIENTRYP MultiTexCoord3fvARB
)( GLenum
, const GLfloat
* );
1077 void (GLAPIENTRYP MultiTexCoord4fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1078 void (GLAPIENTRYP MultiTexCoord4fvARB
)( GLenum
, const GLfloat
* );
1079 void (GLAPIENTRYP Normal3f
)( GLfloat
, GLfloat
, GLfloat
);
1080 void (GLAPIENTRYP Normal3fv
)( const GLfloat
* );
1081 void (GLAPIENTRYP SecondaryColor3fEXT
)( GLfloat
, GLfloat
, GLfloat
);
1082 void (GLAPIENTRYP SecondaryColor3fvEXT
)( const GLfloat
* );
1083 void (GLAPIENTRYP TexCoord1f
)( GLfloat
);
1084 void (GLAPIENTRYP TexCoord1fv
)( const GLfloat
* );
1085 void (GLAPIENTRYP TexCoord2f
)( GLfloat
, GLfloat
);
1086 void (GLAPIENTRYP TexCoord2fv
)( const GLfloat
* );
1087 void (GLAPIENTRYP TexCoord3f
)( GLfloat
, GLfloat
, GLfloat
);
1088 void (GLAPIENTRYP TexCoord3fv
)( const GLfloat
* );
1089 void (GLAPIENTRYP TexCoord4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1090 void (GLAPIENTRYP TexCoord4fv
)( const GLfloat
* );
1091 void (GLAPIENTRYP Vertex2f
)( GLfloat
, GLfloat
);
1092 void (GLAPIENTRYP Vertex2fv
)( const GLfloat
* );
1093 void (GLAPIENTRYP Vertex3f
)( GLfloat
, GLfloat
, GLfloat
);
1094 void (GLAPIENTRYP Vertex3fv
)( const GLfloat
* );
1095 void (GLAPIENTRYP Vertex4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1096 void (GLAPIENTRYP Vertex4fv
)( const GLfloat
* );
1097 void (GLAPIENTRYP CallList
)( GLuint
);
1098 void (GLAPIENTRYP CallLists
)( GLsizei
, GLenum
, const GLvoid
* );
1099 void (GLAPIENTRYP Begin
)( GLenum
);
1100 void (GLAPIENTRYP End
)( void );
1101 void (GLAPIENTRYP PrimitiveRestartNV
)( void );
1102 /* GL_NV_vertex_program */
1103 void (GLAPIENTRYP VertexAttrib1fNV
)( GLuint index
, GLfloat x
);
1104 void (GLAPIENTRYP VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
);
1105 void (GLAPIENTRYP VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
);
1106 void (GLAPIENTRYP VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
);
1107 void (GLAPIENTRYP VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1108 void (GLAPIENTRYP VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
);
1109 void (GLAPIENTRYP VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1110 void (GLAPIENTRYP VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
);
1111 /* GL_ARB_vertex_program */
1112 void (GLAPIENTRYP VertexAttrib1fARB
)( GLuint index
, GLfloat x
);
1113 void (GLAPIENTRYP VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
);
1114 void (GLAPIENTRYP VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
);
1115 void (GLAPIENTRYP VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
);
1116 void (GLAPIENTRYP VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1117 void (GLAPIENTRYP VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
);
1118 void (GLAPIENTRYP VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1119 void (GLAPIENTRYP VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
);
1121 /* GL_EXT_gpu_shader4 / GL 3.0 */
1122 void (GLAPIENTRYP VertexAttribI1i
)( GLuint index
, GLint x
);
1123 void (GLAPIENTRYP VertexAttribI2i
)( GLuint index
, GLint x
, GLint y
);
1124 void (GLAPIENTRYP VertexAttribI3i
)( GLuint index
, GLint x
, GLint y
, GLint z
);
1125 void (GLAPIENTRYP VertexAttribI4i
)( GLuint index
, GLint x
, GLint y
, GLint z
, GLint w
);
1126 void (GLAPIENTRYP VertexAttribI2iv
)( GLuint index
, const GLint
*v
);
1127 void (GLAPIENTRYP VertexAttribI3iv
)( GLuint index
, const GLint
*v
);
1128 void (GLAPIENTRYP VertexAttribI4iv
)( GLuint index
, const GLint
*v
);
1130 void (GLAPIENTRYP VertexAttribI1ui
)( GLuint index
, GLuint x
);
1131 void (GLAPIENTRYP VertexAttribI2ui
)( GLuint index
, GLuint x
, GLuint y
);
1132 void (GLAPIENTRYP VertexAttribI3ui
)( GLuint index
, GLuint x
, GLuint y
, GLuint z
);
1133 void (GLAPIENTRYP VertexAttribI4ui
)( GLuint index
, GLuint x
, GLuint y
, GLuint z
, GLuint w
);
1134 void (GLAPIENTRYP VertexAttribI2uiv
)( GLuint index
, const GLuint
*v
);
1135 void (GLAPIENTRYP VertexAttribI3uiv
)( GLuint index
, const GLuint
*v
);
1136 void (GLAPIENTRYP VertexAttribI4uiv
)( GLuint index
, const GLuint
*v
);
1140 void (GLAPIENTRYP Rectf
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1146 void (GLAPIENTRYP DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
);
1147 void (GLAPIENTRYP DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
1148 const GLvoid
*indices
);
1149 void (GLAPIENTRYP DrawRangeElements
)( GLenum mode
, GLuint start
,
1150 GLuint end
, GLsizei count
,
1151 GLenum type
, const GLvoid
*indices
);
1152 void (GLAPIENTRYP MultiDrawElementsEXT
)( GLenum mode
, const GLsizei
*count
,
1154 const GLvoid
**indices
,
1156 void (GLAPIENTRYP DrawElementsBaseVertex
)( GLenum mode
, GLsizei count
,
1158 const GLvoid
*indices
,
1160 void (GLAPIENTRYP DrawRangeElementsBaseVertex
)( GLenum mode
, GLuint start
,
1161 GLuint end
, GLsizei count
,
1163 const GLvoid
*indices
,
1165 void (GLAPIENTRYP MultiDrawElementsBaseVertex
)( GLenum mode
,
1166 const GLsizei
*count
,
1168 const GLvoid
**indices
,
1170 const GLint
*basevertex
);
1171 void (GLAPIENTRYP DrawArraysInstanced
)(GLenum mode
, GLint first
,
1172 GLsizei count
, GLsizei primcount
);
1173 void (GLAPIENTRYP DrawElementsInstanced
)(GLenum mode
, GLsizei count
,
1174 GLenum type
, const GLvoid
*indices
,
1181 * If you don't support eval, fallback to the default vertex format
1182 * on receiving an eval call and use the pipeline mechanism to
1183 * provide partial T&L acceleration.
1185 * Mesa will provide a set of helper functions to do eval within
1186 * accelerated vertex formats, eventually...
1189 void (GLAPIENTRYP EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
);
1190 void (GLAPIENTRYP EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
, GLint j1
, GLint j2
);
1196 #endif /* DD_INCLUDED */