1 /** 2 * \file dd.h 3 * Device driver interfaces. 4 */ 5 6 /* 7 * Mesa 3-D graphics library 8 * Version: 6.5.2 9 * 10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 11 * 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: 18 * 19 * The above copyright notice and this permission notice shall be included 20 * in all copies or substantial portions of the Software. 21 * 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. 28 */ 29 30 31 #ifndef DD_INCLUDED 32 #define DD_INCLUDED 33 34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */ 35 36 #include "glheader.h" 37 38 struct gl_buffer_object; 39 struct gl_context; 40 struct gl_display_list; 41 struct gl_framebuffer; 42 struct gl_pixelstore_attrib; 43 struct gl_program; 44 struct gl_renderbuffer; 45 struct gl_renderbuffer_attachment; 46 struct gl_shader; 47 struct gl_shader_program; 48 struct gl_texture_image; 49 struct gl_texture_object; 50 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. 54 * 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 57 * at this point. 58 * 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. 62 */ 63 #define MESA_MAP_NOWAIT_BIT 0x0040 64 65 66 /** 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. 72 * 73 * Vertex transformation/clipping/lighting is patched into the T&L module. 74 * Rasterization functions are patched into the swrast module. 75 * 76 * Note: when new functions are added here, the drivers/common/driverfuncs.c 77 * file should be updated too!!! 78 */ 79 struct dd_function_table { 80 /** 81 * Return a string as needed by glGetString(). 82 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be 83 * returned. 84 */ 85 const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name ); 86 87 /** 88 * Notify the driver after Mesa has made some internal state changes. 89 * 90 * This is in addition to any state change callbacks Mesa may already have 91 * made. 92 */ 93 void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state ); 94 95 /** 96 * Get the width and height of the named buffer/window. 97 * 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. 100 */ 101 void (*GetBufferSize)( struct gl_framebuffer *buffer, 102 GLuint *width, GLuint *height ); 103 104 /** 105 * Resize the given framebuffer to the given size. 106 * XXX OBSOLETE: this function will be removed in the future. 107 */ 108 void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb, 109 GLuint width, GLuint height); 110 111 /** 112 * Called whenever an error is generated. 113 * __struct gl_contextRec::ErrorValue contains the error value. 114 */ 115 void (*Error)( struct gl_context *ctx ); 116 117 /** 118 * This is called whenever glFinish() is called. 119 */ 120 void (*Finish)( struct gl_context *ctx ); 121 122 /** 123 * This is called whenever glFlush() is called. 124 */ 125 void (*Flush)( struct gl_context *ctx ); 126 127 /** 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. 131 */ 132 void (*Clear)( struct gl_context *ctx, GLbitfield buffers ); 133 134 /** 135 * Execute glAccum command. 136 */ 137 void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value ); 138 139 140 /** 141 * Execute glRasterPos, updating the ctx->Current.Raster fields 142 */ 143 void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] ); 144 145 /** 146 * \name Image-related functions 147 */ 148 /*@{*/ 149 150 /** 151 * Called by glDrawPixels(). 152 * \p unpack describes how to unpack the source image data. 153 */ 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 ); 159 160 /** 161 * Called by glReadPixels(). 162 */ 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, 167 GLvoid *dest ); 168 169 /** 170 * Called by glCopyPixels(). 171 */ 172 void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy, 173 GLsizei width, GLsizei height, 174 GLint dstx, GLint dsty, GLenum type ); 175 176 /** 177 * Called by glBitmap(). 178 */ 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 ); 183 /*@}*/ 184 185 186 /** 187 * \name Texture image functions 188 */ 189 /*@{*/ 190 191 /** 192 * Choose actual hardware texture format given the texture target, the 193 * user-provided source image format and type and the desired internal 194 * format. In some cases, srcFormat and srcType can be GL_NONE. 195 * Note: target may be GL_TEXTURE_CUBE_MAP, but never 196 * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ]. 197 * Called by glTexImage(), etc. 198 */ 199 gl_format (*ChooseTextureFormat)( struct gl_context *ctx, 200 GLenum target, GLint internalFormat, 201 GLenum srcFormat, GLenum srcType ); 202 203 /** 204 * Called by glTexImage[123]D() and glCopyTexImage[12]D() 205 * Allocate texture memory and copy the user's image to the buffer. 206 * The gl_texture_image fields, etc. will be fully initialized. 207 * The parameters are the same as glTexImage3D(), plus: 208 * \param dims 1, 2, or 3 indicating glTexImage1/2/3D() 209 * \param packing describes how to unpack the source data. 210 * \param texImage is the destination texture image. 211 */ 212 void (*TexImage)(struct gl_context *ctx, GLuint dims, 213 struct gl_texture_image *texImage, 214 GLenum format, GLenum type, const GLvoid *pixels, 215 const struct gl_pixelstore_attrib *packing); 216 217 /** 218 * Called by glTexSubImage[123]D(). 219 * Replace a subset of the target texture with new texel data. 220 */ 221 void (*TexSubImage)(struct gl_context *ctx, GLuint dims, 222 struct gl_texture_image *texImage, 223 GLint xoffset, GLint yoffset, GLint zoffset, 224 GLsizei width, GLsizei height, GLint depth, 225 GLenum format, GLenum type, 226 const GLvoid *pixels, 227 const struct gl_pixelstore_attrib *packing); 228 229 230 /** 231 * Called by glGetTexImage(). 232 */ 233 void (*GetTexImage)( struct gl_context *ctx, 234 GLenum format, GLenum type, GLvoid *pixels, 235 struct gl_texture_image *texImage ); 236 237 /** 238 * Called by glCopyTex[Sub]Image[123]D(). 239 */ 240 void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims, 241 struct gl_texture_image *texImage, 242 GLint xoffset, GLint yoffset, GLint zoffset, 243 struct gl_renderbuffer *rb, 244 GLint x, GLint y, 245 GLsizei width, GLsizei height); 246 247 /** 248 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled. 249 */ 250 void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, 251 struct gl_texture_object *texObj); 252 253 /** 254 * Called by glTexImage[123]D when user specifies a proxy texture 255 * target. 256 * 257 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails. 258 */ 259 GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target, 260 GLint level, GLint internalFormat, 261 GLenum format, GLenum type, 262 GLint width, GLint height, 263 GLint depth, GLint border); 264 /*@}*/ 265 266 267 /** 268 * \name Compressed texture functions 269 */ 270 /*@{*/ 271 272 /** 273 * Called by glCompressedTexImage[123]D(). 274 */ 275 void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims, 276 struct gl_texture_image *texImage, 277 GLsizei imageSize, const GLvoid *data); 278 279 /** 280 * Called by glCompressedTexSubImage[123]D(). 281 */ 282 void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims, 283 struct gl_texture_image *texImage, 284 GLint xoffset, GLint yoffset, GLint zoffset, 285 GLsizei width, GLint height, GLint depth, 286 GLenum format, 287 GLsizei imageSize, const GLvoid *data); 288 289 /** 290 * Called by glGetCompressedTexImage. 291 */ 292 void (*GetCompressedTexImage)(struct gl_context *ctx, 293 struct gl_texture_image *texImage, 294 GLvoid *data); 295 /*@}*/ 296 297 /** 298 * \name Texture object / image functions 299 */ 300 /*@{*/ 301 302 /** 303 * Called by glBindTexture(). 304 */ 305 void (*BindTexture)( struct gl_context *ctx, GLenum target, 306 struct gl_texture_object *tObj ); 307 308 /** 309 * Called to allocate a new texture object. Drivers will usually 310 * allocate/return a subclass of gl_texture_object. 311 */ 312 struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx, 313 GLuint name, GLenum target); 314 /** 315 * Called to delete/free a texture object. Drivers should free the 316 * object and any image data it contains. 317 */ 318 void (*DeleteTexture)(struct gl_context *ctx, 319 struct gl_texture_object *texObj); 320 321 /** Called to allocate a new texture image object. */ 322 struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx); 323 324 /** Called to free a texture image object returned by NewTextureImage() */ 325 void (*DeleteTextureImage)(struct gl_context *ctx, 326 struct gl_texture_image *); 327 328 /** Called to allocate memory for a single texture image */ 329 GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx, 330 struct gl_texture_image *texImage); 331 332 /** Free the memory for a single texture image */ 333 void (*FreeTextureImageBuffer)(struct gl_context *ctx, 334 struct gl_texture_image *texImage); 335 336 /** Map a slice of a texture image into user space. 337 * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice 338 * indicates the 1D array index. 339 * \param texImage the texture image 340 * \param slice the 3D image slice or array texture slice 341 * \param x, y, w, h region of interest 342 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and 343 * GL_MAP_INVALIDATE_RANGE_BIT (if writing) 344 * \param mapOut returns start of mapping of region of interest 345 * \param rowStrideOut returns row stride (in bytes) 346 */ 347 void (*MapTextureImage)(struct gl_context *ctx, 348 struct gl_texture_image *texImage, 349 GLuint slice, 350 GLuint x, GLuint y, GLuint w, GLuint h, 351 GLbitfield mode, 352 GLubyte **mapOut, GLint *rowStrideOut); 353 354 void (*UnmapTextureImage)(struct gl_context *ctx, 355 struct gl_texture_image *texImage, 356 GLuint slice); 357 358 /** For GL_ARB_texture_storage. Allocate memory for whole mipmap stack. 359 * All the gl_texture_images in the texture object will have their 360 * dimensions, format, etc. initialized already. 361 */ 362 GLboolean (*AllocTextureStorage)(struct gl_context *ctx, 363 struct gl_texture_object *texObj, 364 GLsizei levels, GLsizei width, 365 GLsizei height, GLsizei depth); 366 367 /** 368 * Map a renderbuffer into user space. 369 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and 370 * GL_MAP_INVALIDATE_RANGE_BIT (if writing) 371 */ 372 void (*MapRenderbuffer)(struct gl_context *ctx, 373 struct gl_renderbuffer *rb, 374 GLuint x, GLuint y, GLuint w, GLuint h, 375 GLbitfield mode, 376 GLubyte **mapOut, GLint *rowStrideOut); 377 378 void (*UnmapRenderbuffer)(struct gl_context *ctx, 379 struct gl_renderbuffer *rb); 380 381 /*@}*/ 382 383 384 /** 385 * \name Vertex/fragment program functions 386 */ 387 /*@{*/ 388 /** Bind a vertex/fragment program */ 389 void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); 390 /** Allocate a new program */ 391 struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); 392 /** Delete a program */ 393 void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); 394 /** 395 * Notify driver that a program string (and GPU code) has been specified 396 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is 397 * supported by the driver. 398 */ 399 GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, 400 struct gl_program *prog); 401 402 /** 403 * Notify driver that the sampler uniforms for the current program have 404 * changed. On some drivers, this may require shader recompiles. 405 */ 406 void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target, 407 struct gl_program *prog); 408 409 /** Query if program can be loaded onto hardware */ 410 GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, 411 struct gl_program *prog); 412 413 /*@}*/ 414 415 /** 416 * \name GLSL shader/program functions. 417 */ 418 /*@{*/ 419 /** 420 * Called when a shader program is linked. 421 * 422 * This gives drivers an opportunity to clone the IR and make their 423 * own transformations on it for the purposes of code generation. 424 */ 425 GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); 426 /*@}*/ 427 428 /** 429 * \name State-changing functions. 430 * 431 * \note drawing functions are above. 432 * 433 * These functions are called by their corresponding OpenGL API functions. 434 * They are \e also called by the gl_PopAttrib() function!!! 435 * May add more functions like these to the device driver in the future. 436 */ 437 /*@{*/ 438 /** Specify the alpha test function */ 439 void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref); 440 /** Set the blend color */ 441 void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]); 442 /** Set the blend equation */ 443 void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA); 444 void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer, 445 GLenum modeRGB, GLenum modeA); 446 /** Specify pixel arithmetic */ 447 void (*BlendFuncSeparate)(struct gl_context *ctx, 448 GLenum sfactorRGB, GLenum dfactorRGB, 449 GLenum sfactorA, GLenum dfactorA); 450 void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer, 451 GLenum sfactorRGB, GLenum dfactorRGB, 452 GLenum sfactorA, GLenum dfactorA); 453 /** Specify a plane against which all geometry is clipped */ 454 void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation ); 455 /** Enable and disable writing of frame buffer color components */ 456 void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, 457 GLboolean bmask, GLboolean amask ); 458 void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, 459 GLboolean gmask, GLboolean bmask, GLboolean amask); 460 /** Cause a material color to track the current color */ 461 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); 462 /** Specify whether front- or back-facing facets can be culled */ 463 void (*CullFace)(struct gl_context *ctx, GLenum mode); 464 /** Define front- and back-facing polygons */ 465 void (*FrontFace)(struct gl_context *ctx, GLenum mode); 466 /** Specify the value used for depth buffer comparisons */ 467 void (*DepthFunc)(struct gl_context *ctx, GLenum func); 468 /** Enable or disable writing into the depth buffer */ 469 void (*DepthMask)(struct gl_context *ctx, GLboolean flag); 470 /** Specify mapping of depth values from NDC to window coordinates */ 471 void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); 472 /** Specify the current buffer for writing */ 473 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); 474 /** Specify the buffers for writing for fragment programs*/ 475 void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); 476 /** Enable or disable server-side gl capabilities */ 477 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); 478 /** Specify fog parameters */ 479 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); 480 /** Specify implementation-specific hints */ 481 void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode); 482 /** Set light source parameters. 483 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already 484 * been transformed to eye-space. 485 */ 486 void (*Lightfv)(struct gl_context *ctx, GLenum light, 487 GLenum pname, const GLfloat *params ); 488 /** Set the lighting model parameters */ 489 void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); 490 /** Specify the line stipple pattern */ 491 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern ); 492 /** Specify the width of rasterized lines */ 493 void (*LineWidth)(struct gl_context *ctx, GLfloat width); 494 /** Specify a logical pixel operation for color index rendering */ 495 void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode); 496 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname, 497 const GLfloat *params); 498 /** Specify the diameter of rasterized points */ 499 void (*PointSize)(struct gl_context *ctx, GLfloat size); 500 /** Select a polygon rasterization mode */ 501 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode); 502 /** Set the scale and units used to calculate depth values */ 503 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units); 504 /** Set the polygon stippling pattern */ 505 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask ); 506 /* Specifies the current buffer for reading */ 507 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); 508 /** Set rasterization mode */ 509 void (*RenderMode)(struct gl_context *ctx, GLenum mode ); 510 /** Define the scissor box */ 511 void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 512 /** Select flat or smooth shading */ 513 void (*ShadeModel)(struct gl_context *ctx, GLenum mode); 514 /** OpenGL 2.0 two-sided StencilFunc */ 515 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, 516 GLint ref, GLuint mask); 517 /** OpenGL 2.0 two-sided StencilMask */ 518 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); 519 /** OpenGL 2.0 two-sided StencilOp */ 520 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, 521 GLenum zfail, GLenum zpass); 522 /** Control the generation of texture coordinates */ 523 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, 524 const GLfloat *params); 525 /** Set texture environment parameters */ 526 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname, 527 const GLfloat *param); 528 /** Set texture parameters */ 529 void (*TexParameter)(struct gl_context *ctx, GLenum target, 530 struct gl_texture_object *texObj, 531 GLenum pname, const GLfloat *params); 532 /** Set the viewport */ 533 void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 534 /*@}*/ 535 536 537 /** 538 * \name Vertex/pixel buffer object functions 539 */ 540 /*@{*/ 541 void (*BindBuffer)( struct gl_context *ctx, GLenum target, 542 struct gl_buffer_object *obj ); 543 544 struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer, 545 GLenum target ); 546 547 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj ); 548 549 GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, 550 const GLvoid *data, GLenum usage, 551 struct gl_buffer_object *obj ); 552 553 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset, 554 GLsizeiptrARB size, const GLvoid *data, 555 struct gl_buffer_object *obj ); 556 557 void (*GetBufferSubData)( struct gl_context *ctx, 558 GLintptrARB offset, GLsizeiptrARB size, 559 GLvoid *data, struct gl_buffer_object *obj ); 560 561 void (*CopyBufferSubData)( struct gl_context *ctx, 562 struct gl_buffer_object *src, 563 struct gl_buffer_object *dst, 564 GLintptr readOffset, GLintptr writeOffset, 565 GLsizeiptr size ); 566 567 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: 568 */ 569 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset, 570 GLsizeiptr length, GLbitfield access, 571 struct gl_buffer_object *obj); 572 573 void (*FlushMappedBufferRange)(struct gl_context *ctx, 574 GLintptr offset, GLsizeiptr length, 575 struct gl_buffer_object *obj); 576 577 GLboolean (*UnmapBuffer)( struct gl_context *ctx, 578 struct gl_buffer_object *obj ); 579 /*@}*/ 580 581 /** 582 * \name Functions for GL_APPLE_object_purgeable 583 */ 584 /*@{*/ 585 /* variations on ObjectPurgeable */ 586 GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); 587 GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); 588 GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); 589 590 /* variations on ObjectUnpurgeable */ 591 GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); 592 GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); 593 GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); 594 /*@}*/ 595 596 /** 597 * \name Functions for GL_EXT_framebuffer_{object,blit}. 598 */ 599 /*@{*/ 600 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); 601 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); 602 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, 603 struct gl_framebuffer *drawFb, 604 struct gl_framebuffer *readFb); 605 void (*FramebufferRenderbuffer)(struct gl_context *ctx, 606 struct gl_framebuffer *fb, 607 GLenum attachment, 608 struct gl_renderbuffer *rb); 609 void (*RenderTexture)(struct gl_context *ctx, 610 struct gl_framebuffer *fb, 611 struct gl_renderbuffer_attachment *att); 612 void (*FinishRenderTexture)(struct gl_context *ctx, 613 struct gl_renderbuffer_attachment *att); 614 void (*ValidateFramebuffer)(struct gl_context *ctx, 615 struct gl_framebuffer *fb); 616 /*@}*/ 617 void (*BlitFramebuffer)(struct gl_context *ctx, 618 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 619 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, 620 GLbitfield mask, GLenum filter); 621 622 /** 623 * \name Query objects 624 */ 625 /*@{*/ 626 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); 627 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); 628 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); 629 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); 630 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); 631 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); 632 /*@}*/ 633 634 635 /** 636 * \name Vertex Array objects 637 */ 638 /*@{*/ 639 struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id); 640 void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); 641 void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); 642 /*@}*/ 643 644 /** 645 * \name GLSL-related functions (ARB extensions and OpenGL 2.x) 646 */ 647 /*@{*/ 648 struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); 649 void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); 650 struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); 651 void (*DeleteShaderProgram)(struct gl_context *ctx, 652 struct gl_shader_program *shProg); 653 void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); 654 /*@}*/ 655 656 657 /** 658 * \name Support for multiple T&L engines 659 */ 660 /*@{*/ 661 662 /** 663 * Set by the driver-supplied T&L engine. 664 * 665 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd(). 666 */ 667 GLuint CurrentExecPrimitive; 668 669 /** 670 * Current state of an in-progress compilation. 671 * 672 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END, 673 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above. 674 */ 675 GLuint CurrentSavePrimitive; 676 677 678 #define FLUSH_STORED_VERTICES 0x1 679 #define FLUSH_UPDATE_CURRENT 0x2 680 /** 681 * Set by the driver-supplied T&L engine whenever vertices are buffered 682 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not 683 * updated. 684 * 685 * The dd_function_table::FlushVertices call below may be used to resolve 686 * these conditions. 687 */ 688 GLuint NeedFlush; 689 GLuint SaveNeedFlush; 690 691 692 /* Called prior to any of the GLvertexformat functions being 693 * called. Paired with Driver.FlushVertices(). 694 */ 695 void (*BeginVertices)( struct gl_context *ctx ); 696 697 /** 698 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if 699 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered 700 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates 701 * __struct gl_contextRec::Current and gl_light_attrib::Material 702 * 703 * Note that the default T&L engine never clears the 704 * FLUSH_UPDATE_CURRENT bit, even after performing the update. 705 */ 706 void (*FlushVertices)( struct gl_context *ctx, GLuint flags ); 707 void (*SaveFlushVertices)( struct gl_context *ctx ); 708 709 /** 710 * \brief Hook for drivers to prepare for a glBegin/glEnd block 711 * 712 * This hook is called in vbo_exec_Begin() before any action, including 713 * state updates, occurs. 714 */ 715 void (*PrepareExecBegin)( struct gl_context *ctx ); 716 717 /** 718 * Give the driver the opportunity to hook in its own vtxfmt for 719 * compiling optimized display lists. This is called on each valid 720 * glBegin() during list compilation. 721 */ 722 GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode ); 723 724 /** 725 * Notify driver that the special derived value _NeedEyeCoords has 726 * changed. 727 */ 728 void (*LightingSpaceChange)( struct gl_context *ctx ); 729 730 /** 731 * Called by glNewList(). 732 * 733 * Let the T&L component know what is going on with display lists 734 * in time to make changes to dispatch tables, etc. 735 */ 736 void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode ); 737 /** 738 * Called by glEndList(). 739 * 740 * \sa dd_function_table::NewList. 741 */ 742 void (*EndList)( struct gl_context *ctx ); 743 744 /** 745 * Called by glCallList(s). 746 * 747 * Notify the T&L component before and after calling a display list. 748 */ 749 void (*BeginCallList)( struct gl_context *ctx, 750 struct gl_display_list *dlist ); 751 /** 752 * Called by glEndCallList(). 753 * 754 * \sa dd_function_table::BeginCallList. 755 */ 756 void (*EndCallList)( struct gl_context *ctx ); 757 758 /**@}*/ 759 760 /** 761 * \name GL_ARB_sync interfaces 762 */ 763 /*@{*/ 764 struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); 765 void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); 766 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); 767 void (*CheckSync)(struct gl_context *, struct gl_sync_object *); 768 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, 769 GLbitfield, GLuint64); 770 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, 771 GLbitfield, GLuint64); 772 /*@}*/ 773 774 /** GL_NV_conditional_render */ 775 void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, 776 GLenum mode); 777 void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); 778 779 /** 780 * \name GL_OES_draw_texture interface 781 */ 782 /*@{*/ 783 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, 784 GLfloat width, GLfloat height); 785 /*@}*/ 786 787 /** 788 * \name GL_OES_EGL_image interface 789 */ 790 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, 791 struct gl_texture_object *texObj, 792 struct gl_texture_image *texImage, 793 GLeglImageOES image_handle); 794 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, 795 struct gl_renderbuffer *rb, 796 void *image_handle); 797 798 /** 799 * \name GL_EXT_transform_feedback interface 800 */ 801 struct gl_transform_feedback_object * 802 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); 803 void (*DeleteTransformFeedback)(struct gl_context *ctx, 804 struct gl_transform_feedback_object *obj); 805 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, 806 struct gl_transform_feedback_object *obj); 807 void (*EndTransformFeedback)(struct gl_context *ctx, 808 struct gl_transform_feedback_object *obj); 809 void (*PauseTransformFeedback)(struct gl_context *ctx, 810 struct gl_transform_feedback_object *obj); 811 void (*ResumeTransformFeedback)(struct gl_context *ctx, 812 struct gl_transform_feedback_object *obj); 813 814 /** 815 * \name GL_NV_texture_barrier interface 816 */ 817 void (*TextureBarrier)(struct gl_context *ctx); 818 819 /** 820 * \name GL_ARB_sampler_objects 821 */ 822 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx, 823 GLuint name); 824 void (*DeleteSamplerObject)(struct gl_context *ctx, 825 struct gl_sampler_object *samp); 826 827 /** 828 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query. 829 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP); 830 */ 831 uint64_t (*GetTimestamp)(struct gl_context *ctx); 832 }; 833 834 835 /** 836 * Transform/Clip/Lighting interface 837 * 838 * Drivers present a reduced set of the functions possible in 839 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the 840 * remaining functions to map down to these entry points. 841 * 842 * These are the initial values to be installed into dispatch by 843 * mesa. If the T&L driver wants to modify the dispatch table 844 * while installed, it must do so itself. It would be possible for 845 * the vertexformat to install its own initial values for these 846 * functions, but this way there is an obvious list of what is 847 * expected of the driver. 848 * 849 * If the driver wants to hook in entry points other than those 850 * listed, it must restore them to their original values in 851 * the disable() callback, below. 852 */ 853 typedef struct { 854 /** 855 * \name Vertex 856 */ 857 /*@{*/ 858 void (GLAPIENTRYP ArrayElement)( GLint ); 859 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat ); 860 void (GLAPIENTRYP Color3fv)( const GLfloat * ); 861 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 862 void (GLAPIENTRYP Color4fv)( const GLfloat * ); 863 void (GLAPIENTRYP EdgeFlag)( GLboolean ); 864 void (GLAPIENTRYP EvalCoord1f)( GLfloat ); 865 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); 866 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); 867 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); 868 void (GLAPIENTRYP EvalPoint1)( GLint ); 869 void (GLAPIENTRYP EvalPoint2)( GLint, GLint ); 870 void (GLAPIENTRYP FogCoordfEXT)( GLfloat ); 871 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * ); 872 void (GLAPIENTRYP Indexf)( GLfloat ); 873 void (GLAPIENTRYP Indexfv)( const GLfloat * ); 874 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); 875 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat ); 876 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * ); 877 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); 878 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * ); 879 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); 880 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * ); 881 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); 882 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * ); 883 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat ); 884 void (GLAPIENTRYP Normal3fv)( const GLfloat * ); 885 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); 886 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * ); 887 void (GLAPIENTRYP TexCoord1f)( GLfloat ); 888 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * ); 889 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat ); 890 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * ); 891 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat ); 892 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * ); 893 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 894 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * ); 895 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat ); 896 void (GLAPIENTRYP Vertex2fv)( const GLfloat * ); 897 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat ); 898 void (GLAPIENTRYP Vertex3fv)( const GLfloat * ); 899 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 900 void (GLAPIENTRYP Vertex4fv)( const GLfloat * ); 901 void (GLAPIENTRYP CallList)( GLuint ); 902 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); 903 void (GLAPIENTRYP Begin)( GLenum ); 904 void (GLAPIENTRYP End)( void ); 905 void (GLAPIENTRYP PrimitiveRestartNV)( void ); 906 /* GL_NV_vertex_program */ 907 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x ); 908 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); 909 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); 910 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); 911 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 912 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); 913 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 914 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); 915 /* GL_ARB_vertex_program */ 916 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x ); 917 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); 918 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); 919 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); 920 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 921 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); 922 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 923 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); 924 925 /* GL_EXT_gpu_shader4 / GL 3.0 */ 926 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x); 927 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y); 928 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z); 929 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w); 930 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v); 931 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v); 932 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v); 933 934 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x); 935 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y); 936 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z); 937 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); 938 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v); 939 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v); 940 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v); 941 942 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */ 943 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value ); 944 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value); 945 946 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value ); 947 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value); 948 949 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value ); 950 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value); 951 952 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords ); 953 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords ); 954 955 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords ); 956 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords ); 957 958 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords ); 959 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords ); 960 961 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords ); 962 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords ); 963 964 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords ); 965 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords ); 966 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords ); 967 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords ); 968 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords ); 969 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords ); 970 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords ); 971 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords ); 972 973 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords ); 974 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords ); 975 976 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color ); 977 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color ); 978 979 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color ); 980 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color ); 981 982 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color ); 983 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color ); 984 985 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type, 986 GLboolean normalized, GLuint value); 987 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type, 988 GLboolean normalized, GLuint value); 989 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type, 990 GLboolean normalized, GLuint value); 991 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type, 992 GLboolean normalized, GLuint value); 993 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type, 994 GLboolean normalized, 995 const GLuint *value); 996 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type, 997 GLboolean normalized, 998 const GLuint *value); 999 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type, 1000 GLboolean normalized, 1001 const GLuint *value); 1002 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type, 1003 GLboolean normalized, 1004 const GLuint *value); 1005 1006 /*@}*/ 1007 1008 void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); 1009 1010 /** 1011 * \name Array 1012 */ 1013 /*@{*/ 1014 void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count ); 1015 void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type, 1016 const GLvoid *indices ); 1017 void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, 1018 GLuint end, GLsizei count, 1019 GLenum type, const GLvoid *indices ); 1020 void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, 1021 GLenum type, 1022 const GLvoid **indices, 1023 GLsizei primcount); 1024 void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count, 1025 GLenum type, 1026 const GLvoid *indices, 1027 GLint basevertex ); 1028 void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, 1029 GLuint end, GLsizei count, 1030 GLenum type, 1031 const GLvoid *indices, 1032 GLint basevertex); 1033 void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode, 1034 const GLsizei *count, 1035 GLenum type, 1036 const GLvoid * const *indices, 1037 GLsizei primcount, 1038 const GLint *basevertex); 1039 void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first, 1040 GLsizei count, GLsizei primcount); 1041 void (GLAPIENTRYP DrawArraysInstancedBaseInstance)(GLenum mode, GLint first, 1042 GLsizei count, GLsizei primcount, 1043 GLuint baseinstance); 1044 void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count, 1045 GLenum type, const GLvoid *indices, 1046 GLsizei primcount); 1047 void (GLAPIENTRYP DrawElementsInstancedBaseInstance)(GLenum mode, GLsizei count, 1048 GLenum type, const GLvoid *indices, 1049 GLsizei primcount, GLuint baseinstance); 1050 void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, 1051 GLenum type, const GLvoid *indices, 1052 GLsizei primcount, GLint basevertex); 1053 void (GLAPIENTRYP DrawElementsInstancedBaseVertexBaseInstance)(GLenum mode, GLsizei count, 1054 GLenum type, const GLvoid *indices, 1055 GLsizei primcount, GLint basevertex, 1056 GLuint baseinstance); 1057 void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint name); 1058 void (GLAPIENTRYP DrawTransformFeedbackStream)(GLenum mode, GLuint name, 1059 GLuint stream); 1060 void (GLAPIENTRYP DrawTransformFeedbackInstanced)(GLenum mode, GLuint name, 1061 GLsizei primcount); 1062 void (GLAPIENTRYP DrawTransformFeedbackStreamInstanced)(GLenum mode, 1063 GLuint name, 1064 GLuint stream, 1065 GLsizei primcount); 1066 /*@}*/ 1067 1068 /** 1069 * \name Eval 1070 * 1071 * If you don't support eval, fallback to the default vertex format 1072 * on receiving an eval call and use the pipeline mechanism to 1073 * provide partial T&L acceleration. 1074 * 1075 * Mesa will provide a set of helper functions to do eval within 1076 * accelerated vertex formats, eventually... 1077 */ 1078 /*@{*/ 1079 void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); 1080 void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); 1081 /*@}*/ 1082 1083 } GLvertexformat; 1084 1085 1086 #endif /* DD_INCLUDED */ 1087