1Name 2 3 WGL_ARB_pixel_format 4 5Name Strings 6 7 WGL_ARB_pixel_format 8 9Contact 10 11 Pat Brown, NVIDIA (pbrown 'at' nvidia.com) 12 Paula Womack 13 14Notice 15 16 Copyright (c) 2000-2013 The Khronos Group Inc. Copyright terms at 17 http://www.khronos.org/registry/speccopyright.html 18 19Specification Update Policy 20 21 Khronos-approved extension specifications are updated in response to 22 issues and bugs prioritized by the Khronos OpenGL Working Group. For 23 extensions which have been promoted to a core Specification, fixes will 24 first appear in the latest version of that core Specification, and will 25 eventually be backported to the extension document. This policy is 26 described in more detail at 27 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 28 29Status 30 31 Complete. Approved by ARB on 3/15/2000. 32 33Version 34 35 Last Modified Date: March 25, 2009 36 Author Revision: 1.3 37 38Number 39 40 ARB Extension #9 41 42Dependencies 43 44 WGL_ARB_extensions_string is required. 45 46Overview 47 48 This extension adds functions to query pixel format attributes and 49 to choose from the list of supported pixel formats. 50 51 These functions treat pixel formats as opaque types: attributes are 52 specified by name rather than by accessing them directly as fields 53 in a structure. Thus the list of attributes can be easily extended. 54 55 Attribute names are defined which correspond to all of the values in 56 the PIXELFORMATDESCRIPTOR and LAYERPLANEDESCRIPTOR data structures. 57 Additionally this interface allows pixel formats to be supported 58 which have attributes that cannot be represented using the standard 59 pixel format functions, i.e. DescribePixelFormat, 60 DescribeLayerPlane, ChoosePixelFormat, SetPixelFormat, and 61 GetPixelFormat. 62 63IP Status 64 65 No issues. 66 67Issues and Notes 68 69 1. No provision is made to support extended pixel format attributes in 70 metafiles. 71 2. Should the transparent value pixel format attribute have separate red, 72 green and blue values? Yes. 73 3. What data type should the transparent value be? This is no longer an 74 issue since the transparent value is no longer a packed pixel value (it 75 has separate r,g,b,a and index values). 76 4. Should we add DONT_CARE values for some of the pixel format attributes? 77 No we should just ignore attributes that aren't specified in the list 78 passed to wglChoosePixelFormatARB. 79 5. Should wglGetPixelFormatAttrib*vARB ignore the <iLayerPlane> parameter 80 when the attribute specified only applies to the main planes (e.g., 81 when the attribute is set to WGL_NUMBER_OVERLAYS) or should it require 82 <iLayerPlane> to be set to zero? It will just ignore the parameter. 83 This allows these attributes to be queried at the same time as 84 attributes of the overlay planes. 85 6. Should wglGetPixelFormatAttribivARB convert floating point values to 86 fixed point? No, wglChoosePixelFormatARB needs a way to accept floating 87 point values. pfAttribFList accomplishes this. 88 7. Should wglChoosePixelFormatARB take an <iLayerPlane> parameter? 89 Typically <iLayerPlane> would be set to zero and a pixel format would 90 be selected based on the attributes of the main plane, so there is no 91 <iLayerPlane> parameter. This should be OK; applications won't 92 typically select a pixel format on the basis of overlay attributes. 93 They can always call wglGetPixelFormatAttrib*vARB to get a pixel format 94 that has the desired overlay values. 95 8. Application programmers must check to see if a particular extension is 96 supported before using any pixel format attributes associated with the 97 extension. For example, if WGL_ARB_pbuffer is not supported then it is 98 an error to specify WGL_DRAW_TO_PBUFFER_ARB in the attribute list to 99 wglGetPixelFormatAttrib*vARB or wglChoosePixelFormatARB. 100 9. Should WGLChoosePixelFormatARB consider pixel formats at other display 101 depths? It would be useful to have an argument to 102 WGLChoosePixelFormatARB indicating what display depth should be used. 103 However, there is no good way to implement this in the ICD since pixel 104 format handles are sequential indices and the pixel format for index n 105 differs depending on the display mode. 106 10. Should we allow non-displayable pixel formats for pbuffers? Yes, 107 although many (most?) implementations will use displayable pixel 108 formats for pbuffers, this is a useful feature and the spec should 109 allow for it. 110 11. Should we create all new calls for pixel formats, specifically should 111 we introduce SetPixelFormatARB? No, this doesn't offer any value over 112 the existing SetPixelFormat call. 113 12. Should we add support for triple buffering? No, triple buffering needs 114 to be covered by a separate extension. 115 116New Procedures and Functions 117 118 BOOL wglGetPixelFormatAttribivARB(HDC hdc, 119 int iPixelFormat, 120 int iLayerPlane, 121 UINT nAttributes, 122 const int *piAttributes, 123 int *piValues); 124 125 BOOL wglGetPixelFormatAttribfvARB(HDC hdc, 126 int iPixelFormat, 127 int iLayerPlane, 128 UINT nAttributes, 129 const int *piAttributes, 130 FLOAT *pfValues); 131 132 BOOL wglChoosePixelFormatARB(HDC hdc, 133 const int *piAttribIList, 134 const FLOAT *pfAttribFList, 135 UINT nMaxFormats, 136 int *piFormats, 137 UINT *nNumFormats); 138 139New Tokens 140 141 Accepted in the <piAttributes> parameter array of 142 wglGetPixelFormatAttribivARB, and wglGetPixelFormatAttribfvARB, and 143 as a type in the <piAttribIList> and <pfAttribFList> parameter 144 arrays of wglChoosePixelFormatARB: 145 146 WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 147 WGL_DRAW_TO_WINDOW_ARB 0x2001 148 WGL_DRAW_TO_BITMAP_ARB 0x2002 149 WGL_ACCELERATION_ARB 0x2003 150 WGL_NEED_PALETTE_ARB 0x2004 151 WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 152 WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 153 WGL_SWAP_METHOD_ARB 0x2007 154 WGL_NUMBER_OVERLAYS_ARB 0x2008 155 WGL_NUMBER_UNDERLAYS_ARB 0x2009 156 WGL_TRANSPARENT_ARB 0x200A 157 WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 158 WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 159 WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 160 WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A 161 WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B 162 WGL_SHARE_DEPTH_ARB 0x200C 163 WGL_SHARE_STENCIL_ARB 0x200D 164 WGL_SHARE_ACCUM_ARB 0x200E 165 WGL_SUPPORT_GDI_ARB 0x200F 166 WGL_SUPPORT_OPENGL_ARB 0x2010 167 WGL_DOUBLE_BUFFER_ARB 0x2011 168 WGL_STEREO_ARB 0x2012 169 WGL_PIXEL_TYPE_ARB 0x2013 170 WGL_COLOR_BITS_ARB 0x2014 171 WGL_RED_BITS_ARB 0x2015 172 WGL_RED_SHIFT_ARB 0x2016 173 WGL_GREEN_BITS_ARB 0x2017 174 WGL_GREEN_SHIFT_ARB 0x2018 175 WGL_BLUE_BITS_ARB 0x2019 176 WGL_BLUE_SHIFT_ARB 0x201A 177 WGL_ALPHA_BITS_ARB 0x201B 178 WGL_ALPHA_SHIFT_ARB 0x201C 179 WGL_ACCUM_BITS_ARB 0x201D 180 WGL_ACCUM_RED_BITS_ARB 0x201E 181 WGL_ACCUM_GREEN_BITS_ARB 0x201F 182 WGL_ACCUM_BLUE_BITS_ARB 0x2020 183 WGL_ACCUM_ALPHA_BITS_ARB 0x2021 184 WGL_DEPTH_BITS_ARB 0x2022 185 WGL_STENCIL_BITS_ARB 0x2023 186 WGL_AUX_BUFFERS_ARB 0x2024 187 188 Accepted as a value in the <piAttribIList> and <pfAttribFList> 189 parameter arrays of wglChoosePixelFormatARB, and returned in the 190 <piValues> parameter array of wglGetPixelFormatAttribivARB, and the 191 <pfValues> parameter array of wglGetPixelFormatAttribfvARB: 192 193 WGL_NO_ACCELERATION_ARB 0x2025 194 WGL_GENERIC_ACCELERATION_ARB 0x2026 195 WGL_FULL_ACCELERATION_ARB 0x2027 196 197 WGL_SWAP_EXCHANGE_ARB 0x2028 198 WGL_SWAP_COPY_ARB 0x2029 199 WGL_SWAP_UNDEFINED_ARB 0x202A 200 201 WGL_TYPE_RGBA_ARB 0x202B 202 WGL_TYPE_COLORINDEX_ARB 0x202C 203 204Additions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 205 206 None 207 208Additions to Chapter 3 of the 1.2 Specification (Rasterization) 209 210 None 211 212Additions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations and 213the Frame buffer) 214 215 None 216 217Additions to Chapter 5 of the 1.2 Specification (Special Functions) 218 219 None 220 221Additions to Chapter 6 of the 1.2 Specification (State and State Requests) 222 223 None 224 225Additions to the WGL Specification 226 227 Pixel Formats 228 229 WGL uses pixel format indices to refer to the pixel formats 230 supported by a device. The standard pixel format functions 231 DescribePixelFormat, DescribeLayerPlane, ChoosePixelFormat, 232 SetPixelFormat, and GetPixelFormat specify pixel format attributes 233 using the PIXELFORMATDESCRIPTOR and LAYERPLANEDESCRIPTOR data 234 structures. 235 236 An additional set of functions may be used to query and specify 237 pixel format attributes by name. 238 239 Querying Pixel Format Attributes 240 241 The following two functions can be used to query pixel format 242 attributes by specifying a list of attributes to be queried and 243 providing a buffer in which to receive the results from the query. 244 These functions can be used to query the attributes of both the main 245 plane and layer planes of a given pixel format. 246 247 BOOL wglGetPixelFormatAttribivARB(HDC hdc, 248 int iPixelFormat, 249 int iLayerPlane, 250 UINT nAttributes, 251 const int *piAttributes, 252 int *piValues); 253 254 <hdc> specifies the device context on which the pixel format is 255 supported. 256 257 <iPixelFormat> is an index that specifies the pixel format. The 258 pixel formats that a device context supports are identified by 259 positive one-based integer indexes. 260 261 <iLayerPlane> specifies which plane is being queried. Positive 262 values of <iLayerPlane> identify overlay planes, where 1 is the 263 first overlay plane over the main plane, 2 is the second overlay 264 plane over the first overlay plane, and so on. Negative values 265 identify underlay planes, where -1 is the first underlay plane under 266 the main plane, -2 is the second underlay plane under the first 267 underlay plane and so on. Use zero for the main plane. 268 269 <nAttributes> number of attributes being queried. 270 271 <piAttributes> list containing an array of pixel format attribute 272 identifiers which specify the attributes to be queried. The 273 following values are accepted: 274 275 WGL_NUMBER_PIXEL_FORMATS_ARB 276 The number of pixel formats for the device context. The 277 <iLayerPlane> and <iPixelFormat> parameters are ignored if this 278 attribute is specified. 279 280 WGL_DRAW_TO_WINDOW_ARB 281 True if the pixel format can be used with a window. The 282 <iLayerPlane> parameter is ignored if this attribute is 283 specified. 284 285 WGL_DRAW_TO_BITMAP_ARB 286 True if the pixel format can be used with a memory bitmap. The 287 <iLayerPlane> parameter is ignored if this attribute is 288 specified. 289 290 WGL_ACCELERATION_ARB 291 Indicates whether the pixel format is supported by the driver. 292 If this is set to WGL_NO_ACCELERATION_ARB then only the software 293 renderer supports this pixel format; if this is set to 294 WGL_GENERIC_ACCELERATION_ARB then the pixel format is supported 295 by an MCD driver; if this is set to WGL_FULL_ACCELERATION_ARB 296 then the pixel format is supported by an ICD driver. 297 298 WGL_NEED_PALETTE_ARB 299 A logical palette is required to achieve the best results for 300 this pixel format. The <iLayerPlane> parameter is ignored if 301 this attribute is specified. 302 303 WGL_NEED_SYSTEM_PALETTE_ARB 304 The hardware supports one hardware palette in 256-color mode 305 only. The <iLayerPlane> parameter is ignored if this attribute 306 is specified. 307 308 WGL_SWAP_LAYER_BUFFERS_ARB 309 True if the pixel format supports swapping layer planes 310 independently of the main planes. If the pixel format does not 311 support a back buffer then this is set to FALSE. The 312 <iLayerPlane> parameter is ignored if this attribute is 313 specified. 314 315 WGL_SWAP_METHOD_ARB 316 If the pixel format supports a back buffer, then this indicates 317 how they are swapped. If this attribute is set to 318 WGL_SWAP_EXCHANGE_ARB then swapping exchanges the front and back 319 buffer contents; if it is set to WGL_SWAP_COPY_ARB then swapping 320 copies the back buffer contents to the front buffer; if it is 321 set to WGL_SWAP_UNDEFINED_ARB then the back buffer contents are 322 copied to the front buffer but the back buffer contents are 323 undefined after the operation. If the pixel format does not 324 support a back buffer then this parameter is set to 325 WGL_SWAP_UNDEFINED_ARB. The <iLayerPlane> parameter is ignored 326 if this attribute is specified. 327 328 WGL_NUMBER_OVERLAYS_ARB 329 The number of overlay planes. The <iLayerPlane> parameter is 330 ignored if this attribute is specified. 331 332 WGL_NUMBER_UNDERLAYS_ARB 333 The number of underlay planes. The <iLayerPlane> parameter is 334 ignored if this attribute is specified. 335 336 WGL_TRANSPARENT_ARB 337 True if transparency is supported. 338 339 WGL_TRANSPARENT_RED_VALUE_ARB 340 Specifies the transparent red color value. Typically this value 341 is the same for all layer planes. This value is undefined if 342 transparency is not supported. 343 344 WGL_TRANSPARENT_GREEN_VALUE_ARB 345 Specifies the transparent green value. Typically this value is 346 the same for all layer planes. This value is undefined if 347 transparency is not supported. 348 349 WGL_TRANSPARENT_BLUE_VALUE_ARB 350 Specifies the transparent blue color value. Typically this value 351 is the same for all layer planes. This value is undefined if 352 transparency is not supported. 353 354 WGL_TRANSPARENT_ALPHA_VALUE_ARB 355 Specifies the transparent alpha value. This is reserved for 356 future use. 357 358 WGL_TRANSPARENT_INDEX_VALUE_ARB 359 Specifies the transparent color index value. Typically this 360 value is the same for all layer planes. This value is undefined 361 if transparency is not supported. 362 363 WGL_SHARE_DEPTH_ARB 364 True if the layer plane shares the depth buffer with the main 365 planes. If <iLayerPlane> is zero, this is always true. 366 367 WGL_SHARE_STENCIL_ARB 368 True if the layer plane shares the stencil buffer with the main 369 planes. If <iLayerPlane> is zero, this is always true. 370 371 WGL_SHARE_ACCUM_ARB 372 True if the layer plane shares the accumulation buffer with the 373 main planes. If <iLayerPlane> is zero, this is always true. 374 375 WGL_SUPPORT_GDI_ARB 376 True if GDI rendering is supported. 377 378 WGL_SUPPORT_OPENGL_ARB 379 True if OpenGL is supported. 380 381 WGL_DOUBLE_BUFFER_ARB 382 True if the color buffer has back/front pairs. 383 384 WGL_STEREO_ARB 385 True if the color buffer has left/right pairs. 386 387 WGL_PIXEL_TYPE_ARB 388 The type of pixel data. This can be set to WGL_TYPE_RGBA_ARB or 389 WGL_TYPE_COLORINDEX_ARB. 390 391 WGL_COLOR_BITS_ARB 392 The number of color bitplanes in each color buffer. For RGBA 393 pixel types, it is the size of the color buffer, excluding the 394 alpha bitplanes. For color-index pixels, it is the size of the 395 color index buffer. 396 397 WGL_RED_BITS_ARB 398 The number of red bitplanes in each RGBA color buffer. 399 400 WGL_RED_SHIFT_ARB 401 The shift count for red bitplanes in each RGBA color buffer. 402 403 WGL_GREEN_BITS_ARB 404 The number of green bitplanes in each RGBA color buffer. 405 406 WGL_GREEN_SHIFT_ARB 407 The shift count for green bitplanes in each RGBA color buffer. 408 409 WGL_BLUE_BITS_ARB 410 The number of blue bitplanes in each RGBA color buffer. 411 412 WGL_BLUE_SHIFT_ARB 413 The shift count for blue bitplanes in each RGBA color buffer. 414 415 WGL_ALPHA_BITS_ARB 416 The number of alpha bitplanes in each RGBA color buffer. 417 418 WGL_ALPHA_SHIFT_ARB 419 The shift count for alpha bitplanes in each RGBA color buffer. 420 421 WGL_ACCUM_BITS_ARB 422 The total number of bitplanes in the accumulation buffer. 423 424 WGL_ACCUM_RED_BITS_ARB 425 The number of red bitplanes in the accumulation buffer. 426 427 WGL_ACCUM_GREEN_BITS_ARB 428 The number of green bitplanes in the accumulation buffer. 429 430 WGL_ACCUM_BLUE_BITS_ARB 431 The number of blue bitplanes in the accumulation buffer. 432 433 WGL_ACCUM_ALPHA_BITS_ARB 434 The number of alpha bitplanes in the accumulation buffer. 435 436 WGL_DEPTH_BITS_ARB 437 The depth of the depth (z-axis) buffer. 438 439 WGL_STENCIL_BITS_ARB 440 The depth of the stencil buffer. 441 442 WGL_AUX_BUFFERS_ARB 443 The number of auxiliary buffers. 444 445 <piValues> points to a buffer into which the results of the query 446 will be placed. Floating point attribute values are rounded to the 447 nearest integer value. The caller must allocate this array and it 448 must have at least <nattributes> entries. 449 450 If the function succeeds, the return value is TRUE. If the function 451 fails, the return value is FALSE. To get extended error information, 452 call GetLastError. 453 454 An error is generated if <piAttributes> contains an invalid 455 attribute, if <iPixelFormat> is not a positive integer or is larger 456 than the number of pixel formats, if <iLayerPlane> doesn't refer to 457 an existing layer plane, or if <hdc> is invalid. 458 459 If FALSE is returned, the contents of <piValues> are undefined. 460 461 BOOL wglGetPixelFormatAttribfvARB(HDC hdc, 462 int iPixelFormat, 463 int iLayerPlane, 464 UINT nAttributes, 465 const int *piAttributes, 466 FLOAT *pfValues); 467 468 <hdc> specifies the device context on which the pixel format is 469 supported. 470 471 <iPixelFormat> is an index that specifies the pixel format. The 472 pixel formats that a device context supports are identified by 473 positive one-based integer indexes. 474 475 <iLayerPlane> specifies which plane is being queried. Positive 476 values of <iLayerPlane> identify overlay planes, where 1 is the 477 first overlay plane over the main plane, 2 is the second overlay 478 plane over the first overlay plane, and so on. Negative values 479 identify underlay planes, where -1 is the first underlay plane under 480 the main plane, -2 is the second underlay plane under the first 481 underlay plane and so on. Use zero for the main plane. 482 483 <nAttributes> number of attributes being queried. 484 485 <piAttributes> list containing an array of pixel format attribute 486 identifiers which specify the attributes to be queried. The values 487 accepted are the same as for wglGetPixelFormatAttribivARB. 488 489 <pfValues> is a pointer to a buffer into which the results of the 490 query will be placed. Integer attribute values are converted 491 floating point The caller must allocate this array and it must have 492 at least at least <nAttributes> entries. 493 494 If the function succeeds, the return value is TRUE. If the function 495 fails, the return value is FALSE. To get extended error information, 496 call GetLastError. 497 498 An error is generated if <piAttributes> contains an invalid 499 attribute, if <iPixelFormat> is not a positive integer or is larger 500 than the number of pixel formats, if <iLayerPlane> doesn't refer to 501 an existing layer plane, or if <hdc> is invalid. 502 503 If FALSE is returned, the contents of <pfValues> are undefined. 504 505 Supported Pixel Formats 506 507 The maximum index of the pixel formats which can be referenced by 508 the standard pixel format functions is returned by a successful call 509 to DescribePixelFormat. This may be less than the maximum index of 510 the pixel formats which can be referenced by 511 wglGetPixelFormatAttribivARB and wglGetPixelFormatAttribfvARB. 512 (determined by querying WGL_NUMBER_PIXEL_FORMATS_ARB). 513 514 The pixel format of a "displayable" object (e.g. window, bitmap) is 515 specified by passing its index to SetPixelFormat. Therefore, pixel 516 formats which cannot be referenced by the standard pixel format 517 functions are "non displayable". 518 519 Indices are assigned to pixel formats in the following order: 520 521 1. Accelerated pixel formats that are displayable 522 523 2. Accelerated pixel formats that are displayable and which have 524 extended attributes 525 526 3. Generic pixel formats 527 528 4. Accelerated pixel formats that are non displayable 529 530 ChoosePixelFormat will never select pixel formats from either group 531 2 or group 4. Each pixel format in group 2 is required to appear 532 identical to some pixel format in group 1 when queried by 533 DescribePixelFormat. Consequently, ChoosePixelFormat will always 534 select a format from group 1 when it might otherwise have selected a 535 format from group 2. Pixel formats in group 4 cannot be accessed by 536 ChoosePixelFormat at all. 537 538 SetPixelFormat and DescribePixelFormat will only accept pixel 539 formats from groups 1-3. If a non-displayable pixel format is 540 specified to SetPixelFormat or DescribePixelFormat an error will 541 result. These pixel formats are only for use with WGL extensions, 542 such as WGLCreatePbufferARB. 543 544 The following function may be used to select from among all of the 545 available pixel formats (including both accelerated and generic 546 formats and non-displayable formats). This function accepts 547 attributes for the main planes. A list of pixel formats that match 548 the specified attributes is returned with the "best" pixel formats 549 at the start of the list (order is device dependent). 550 551 BOOL wglChoosePixelFormatARB(HDC hdc, 552 const int *piAttribIList, 553 const FLOAT *pfAttribFList, 554 UINT nMaxFormats, 555 int *piFormats, 556 UINT *nNumFormats); 557 558 <hdc> specifies the device context. 559 560 <piAttribIList> specifies a list of attribute {type, value} pairs 561 containing integer attribute values. All the attributes in 562 <piAttribIList> are followed by the corresponding desired value. The 563 list is terminated with 0. If <piAttribList> is NULL then the result 564 is the same as if <piAttribList> was empty. 565 566 <pfAttribFList> specifies a list of attribute {type, value} pairs 567 containing floating point attribute values. All the attributes in 568 <pfAttribFList> are followed by the corresponding desired value. The 569 list is terminated with 0. If <pfAttribList> is NULL then the result 570 is the same as if <pfAttribList> was empty. 571 572 <nMaxFormats> specifies the maximum number of pixel formats to be 573 returned. 574 575 <piFormats> points to an array of returned indices of the matching 576 pixel formats. The best pixel formats (i.e., closest match and best 577 format for the hardware) are at the head of the list. The caller 578 must allocate this array and it must have at least <nMaxFormats> 579 entries. 580 581 <nNumFormats> returns the number of matching formats. The returned 582 value is guaranteed to be no larger than <nMaxFormats>. 583 584 If the function succeeds, the return value is TRUE. If the function 585 fails the return value is FALSE. To get extended error information, 586 call GetLastError. If no matching formats are found then nNumFormats 587 is set to zero and the function returns TRUE. 588 589 If FALSE is returned, the contents of <piFormats> are undefined. 590 591 wglChoosePixelFormatARB selects pixel formats to return based on the 592 attribute values specified in <piAttribIList> and <pfAttribFList>. 593 Some attribute values must match the pixel format value exactly when 594 the attribute is specified while others specify a minimum criteria, 595 meaning that the pixel format value must meet or exceed the 596 specified value. See the table below for details. 597 598 599 Attribute Type Match Criteria 600 601 WGL_DRAW_TO_WINDOW_ARB boolean exact 602 WGL_DRAW_TO_BITMAP_ARB boolean exact 603 WGL_ACCELERATION_ARB enum exact 604 WGL_NEED_PALETTE_ARB boolean exact 605 WGL_NEED_SYSTEM_PALETTE_ARB boolean exact 606 WGL_SWAP_LAYER_BUFFERS_ARB boolean exact 607 WGL_SWAP_METHOD_ARB enum exact 608 WGL_NUMBER_OVERLAYS_ARB integer minimum 609 WGL_NUMBER_UNDERLAYS_ARB integer minimum 610 WGL_SHARE_DEPTH_ARB boolean exact 611 WGL_SHARE_STENCIL_ARB boolean exact 612 WGL_SHARE_ACCUM_ARB boolean exact 613 WGL_SUPPORT_GDI_ARB boolean exact 614 WGL_SUPPORT_OPENGL_ARB boolean exact 615 WGL_DOUBLE_BUFFER_ARB boolean exact 616 WGL_STEREO_ARB boolean exact 617 WGL_PIXEL_TYPE_ARB enum exact 618 WGL_COLOR_BITS_ARB integer minimum 619 WGL_RED_BITS_ARB integer minimum 620 WGL_GREEN_BITS_ARB integer minimum 621 WGL_BLUE_BITS_ARB integer minimum 622 WGL_ALPHA_BITS_ARB integer minimum 623 WGL_ACCUM_BITS_ARB integer minimum 624 WGL_ACCUM_RED_BITS_ARB integer minimum 625 WGL_ACCUM_GREEN_BITS_ARB integer minimum 626 WGL_ACCUM_BLUE_BITS_ARB integer minimum 627 WGL_ACCUM_ALPHA_BITS_ARB integer minimum 628 WGL_DEPTH_BITS_ARB integer minimum 629 WGL_STENCIL_BITS_ARB integer minimum 630 WGL_AUX_BUFFERS_ARB integer minimum 631 632 All attributes except WGL_NUMBER_OVERLAYS_ARB, WGL_NUMBER_UNDERLAYS_ARB, 633 WGL_SHARE_DEPTH_ARB, WGL_SHARE_STENCIL_ARB, and WGL_SHARE_ACCUM_ARB 634 apply to the main planes and not to any layer planes. If 635 WGL_SHARE_DEPTH_ARB, WGL_SHARE_STENCIL_ARB, and WGL_SHARE_ACCUM_ARB are 636 specified in either <piAttribList> or <pfAttribList>, then a pixel 637 format will only be selected if it has no overlays or underlays or if 638 all of its overlays and underlays match the specified value. 639 Applications that need to find a pixel format that supports a layer 640 plane with other buffer attributes (such as WGL_SUPPORT_OPENGL_ARB set 641 to TRUE), must go through the list that is returned and call 642 wglGetPixelFormatAttrib*vARB to find one with the appropriate 643 attributes. 644 645 Attributes that are specified in neither <piAttribIList> nor 646 <pfAttribFList> are ignored (i.e., they are not looked at during the 647 selection process). In addition the following attributes are always 648 ignored, even if specified: WGL_NUMBER_PIXEL_FORMATS_ARB, 649 WGL_RED_SHIFT_ARB, WGL_GREEN_SHIFT_ARB, WGL_BLUE_SHIFT_ARB, 650 WGL_ALPHA_SHIFT_ARB, WGL_TRANSPARENT_ARB, 651 WGL_TRANSPARENT_RED_VALUE_ARB,WGL_TRANSPARENT_GREEN_VALUE_ARB, 652 WGL_TRANSPARENT_BLUE_VALUE_ARB, WGL_TRANSPARENT_ALPHA_VALUE_ARB, and 653 WGL_TRANSPARENT_INDEX_ARB. 654 655 If both <piAttribIList> and <pfAttribFList> are NULL or empty then all 656 pixel formats for this device are returned. 657 658 An error is generated if <piAttribIList> or <pfAttribFList> contain an 659 invalid attribute or if <hdc> is invalid. 660 661 Although it is not an error, wglChoosePixelFormat and 662 wglChoosePixelFormatARB should not be used together. It is not necessary 663 to change existing OpenGL programs but application writers should use 664 wglChoosePixelFormatARB whenever possible. New pixel format attributes 665 introduced by extensions (such as the number of multisample buffers) 666 will only be known to the new calls, wglChoosePixelFormatARB and 667 wglGetPixelFormatAttrib*vARB.. 668 669New State 670 671 None 672 673New Implementation Dependent State 674 675 None 676 677Dependencies on WGL_ARB_extensions_string 678 679 Because there is no way to extend WGL, these calls are defined in the 680 ICD and can be called by obtaining the address with wglGetProcAddress. 681 Because this extension is a WGL extension, it is not included in the 682 extension string returned by glGetString. Its existence can be 683 determined with the WGL_ARB_extensions_string extension. 684 685Revision History 686 687Changes from EXT_pixel_format: 688 689 * Added WGL prefix to name to avoid possible name collisions 690 * EXT suffix changed to ARB 691 * Updated to new template, adding contact, status and revision sections 692 * Version is no longer an RCS version 693 * Attribute list passed to wglGetPixelFormatAttrib*v is type const 694 * Separate red,green,blue,alpha and index transparent values 695 * WGL_SWAP_LAYER_BUFFERS and WGL_SWAP_METHOD values defined for single 696 buffered pixel formats 697 * Array of return values for wglGetPixelFormatAttrib*v and 698 wglChoosePixelFormatARB is undefined if function fails 699 * Error returned if iPixelFormat is zero or negative in 700 wglGetPixelFormat*v 701 * Under "Supported Pixel Formats", indicate that SetPixelFormat and 702 DescribePixelFormat do not accept non displayable pixel formats. 703 Passing one in results in an error 704 * If either piAttribIList of pfAttribFList are NULL when 705 wglChoosePixelFormatARB is called then it is as if they were empty 706 * Clarify that wglChoosePixelFormatARB returns TRUE even if no matching 707 formats found 708 * wglChoosePixelFormatARB will only match an overlay attribute (eg, 709 WGL_SHARE_DEPTH_ARB) if there are no overlay planes or if all 710 overlay/underlay plane attributes match the specified criteria 711 * Be careful about using term hardware (change to pixel format where 712 appropriate) 713 * wglChoosePixelFormatARB now ignores the following attributes (in 714 addition to WGL_NUMBER_PIXEL_FORMATS_ARB): WGL_*_SHIFT_ARB, 715 WGL_TRANSPARENT_ARB, WGL_TRANSPARENT_*_VALUE_ARB. 716 * Clarify that new pixel format attributes (eg, attributes introduced by 717 extensions such as multisampling) are only known to the new pixel 718 format calls, wglChoosePixelFormatARB and wglGetPixelFormat*vARB. 719 * Add dependency on WGL_ARB_extensions_string 720 721 03/12/2002 1.1 722 - Updated contact information. 723 724 07/29/2008 1.2 725 - Updated contact information. 726 727 03/25/2009 1.3 728 - mjk: Fixed <nNumFormats> description 729