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