gdi32: Select the pattern brush only when first used.
[wine/multimedia.git] / dlls / gdi32 / dibdrv / dc.c
blobed7b0f7c725d9c3dceaebf29c3e7013207ca0680
1 /*
2 * DIB driver initialization and DC functions.
4 * Copyright 2011 Huw Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <assert.h>
23 #include "gdi_private.h"
24 #include "dibdrv.h"
26 #include "wine/exception.h"
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(dib);
31 static const DWORD bit_fields_888[3] = {0xff0000, 0x00ff00, 0x0000ff};
32 static const DWORD bit_fields_555[3] = {0x7c00, 0x03e0, 0x001f};
34 static void calc_shift_and_len(DWORD mask, int *shift, int *len)
36 int s, l;
38 if(!mask)
40 *shift = *len = 0;
41 return;
44 s = 0;
45 while ((mask & 1) == 0)
47 mask >>= 1;
48 s++;
50 l = 0;
51 while ((mask & 1) == 1)
53 mask >>= 1;
54 l++;
56 *shift = s;
57 *len = l;
60 static void init_bit_fields(dib_info *dib, const DWORD *bit_fields)
62 dib->red_mask = bit_fields[0];
63 dib->green_mask = bit_fields[1];
64 dib->blue_mask = bit_fields[2];
65 calc_shift_and_len(dib->red_mask, &dib->red_shift, &dib->red_len);
66 calc_shift_and_len(dib->green_mask, &dib->green_shift, &dib->green_len);
67 calc_shift_and_len(dib->blue_mask, &dib->blue_shift, &dib->blue_len);
70 static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD *bit_fields,
71 RGBQUAD *color_table, void *bits, enum dib_info_flags flags)
73 dib->bit_count = bi->biBitCount;
74 dib->width = bi->biWidth;
75 dib->height = bi->biHeight;
76 dib->compression = bi->biCompression;
77 dib->stride = get_dib_stride( dib->width, dib->bit_count );
78 dib->bits.ptr = bits;
79 dib->bits.is_copy = FALSE;
80 dib->bits.free = NULL;
81 dib->bits.param = NULL;
82 dib->flags = flags;
84 if(dib->height < 0) /* top-down */
86 dib->height = -dib->height;
88 else /* bottom-up */
90 /* bits always points to the top-left corner and the stride is -ve */
91 dib->bits.ptr = (BYTE*)dib->bits.ptr + (dib->height - 1) * dib->stride;
92 dib->stride = -dib->stride;
95 dib->funcs = &funcs_null;
97 switch(dib->bit_count)
99 case 32:
100 if(bi->biCompression == BI_RGB)
101 bit_fields = bit_fields_888;
103 init_bit_fields(dib, bit_fields);
105 if(dib->red_mask == 0xff0000 && dib->green_mask == 0x00ff00 && dib->blue_mask == 0x0000ff)
106 dib->funcs = &funcs_8888;
107 else
108 dib->funcs = &funcs_32;
109 break;
111 case 24:
112 dib->funcs = &funcs_24;
113 break;
115 case 16:
116 if(bi->biCompression == BI_RGB)
117 bit_fields = bit_fields_555;
119 init_bit_fields(dib, bit_fields);
121 if(dib->red_mask == 0x7c00 && dib->green_mask == 0x03e0 && dib->blue_mask == 0x001f)
122 dib->funcs = &funcs_555;
123 else
124 dib->funcs = &funcs_16;
125 break;
127 case 8:
128 dib->funcs = &funcs_8;
129 break;
131 case 4:
132 dib->funcs = &funcs_4;
133 break;
135 case 1:
136 dib->funcs = &funcs_1;
137 break;
139 default:
140 TRACE("bpp %d not supported, will forward to graphics driver.\n", dib->bit_count);
141 return FALSE;
144 if (color_table && bi->biClrUsed)
146 if (flags & private_color_table)
148 dib->color_table = HeapAlloc(GetProcessHeap(), 0, bi->biClrUsed * sizeof(dib->color_table[0]));
149 if(!dib->color_table) return FALSE;
150 memcpy(dib->color_table, color_table, bi->biClrUsed * sizeof(color_table[0]));
152 else
153 dib->color_table = color_table;
154 dib->color_table_size = bi->biClrUsed;
156 else if (flags & default_color_table)
158 dib->color_table = (RGBQUAD *)get_default_color_table( dib->bit_count );
159 dib->color_table_size = dib->color_table ? (1 << dib->bit_count) : 0;
161 else
163 dib->color_table = NULL;
164 dib->color_table_size = 0;
167 return TRUE;
170 BOOL init_dib_info_from_bitmapinfo(dib_info *dib, const BITMAPINFO *info, void *bits, enum dib_info_flags flags)
172 return init_dib_info( dib, &info->bmiHeader, (const DWORD *)info->bmiColors,
173 (RGBQUAD *)info->bmiColors, bits, flags );
176 BOOL init_dib_info_from_bitmapobj(dib_info *dib, BITMAPOBJ *bmp, enum dib_info_flags flags)
178 if (!bmp->dib)
180 BITMAPINFO info;
182 get_ddb_bitmapinfo( bmp, &info );
183 if (!bmp->bitmap.bmBits)
185 int width_bytes = get_dib_stride( bmp->bitmap.bmWidth, bmp->bitmap.bmBitsPixel );
186 bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
187 bmp->bitmap.bmHeight * width_bytes );
188 if (!bmp->bitmap.bmBits) return FALSE;
190 return init_dib_info_from_bitmapinfo( dib, &info, bmp->bitmap.bmBits, flags );
192 return init_dib_info( dib, &bmp->dib->dsBmih, bmp->dib->dsBitfields,
193 bmp->color_table, bmp->dib->dsBm.bmBits, flags );
196 static void clear_dib_info(dib_info *dib)
198 dib->color_table = NULL;
199 dib->bits.ptr = NULL;
200 dib->bits.free = NULL;
201 dib->bits.param = NULL;
204 /**********************************************************************
205 * free_dib_info
207 * Free the resources associated with a dib and optionally the bits
209 void free_dib_info(dib_info *dib)
211 if (dib->flags & private_color_table)
212 HeapFree(GetProcessHeap(), 0, dib->color_table);
214 if (dib->bits.free) dib->bits.free( &dib->bits );
215 clear_dib_info( dib );
218 void copy_dib_color_info(dib_info *dst, const dib_info *src)
220 dst->bit_count = src->bit_count;
221 dst->red_mask = src->red_mask;
222 dst->green_mask = src->green_mask;
223 dst->blue_mask = src->blue_mask;
224 dst->red_len = src->red_len;
225 dst->green_len = src->green_len;
226 dst->blue_len = src->blue_len;
227 dst->red_shift = src->red_shift;
228 dst->green_shift = src->green_shift;
229 dst->blue_shift = src->blue_shift;
230 dst->funcs = src->funcs;
231 dst->color_table_size = src->color_table_size;
232 dst->color_table = NULL;
233 dst->flags = src->flags;
234 if(dst->color_table_size)
236 int size = dst->color_table_size * sizeof(dst->color_table[0]);
237 if (dst->flags & private_color_table)
239 dst->color_table = HeapAlloc(GetProcessHeap(), 0, size);
240 memcpy(dst->color_table, src->color_table, size);
242 else
243 dst->color_table = src->color_table;
247 DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bitblt_coords *src,
248 const BITMAPINFO *dst_info, void *dst_bits, BOOL add_alpha )
250 dib_info src_dib, dst_dib;
251 DWORD ret;
253 if ( !init_dib_info_from_bitmapinfo( &src_dib, src_info, src_bits, default_color_table ) )
254 return ERROR_BAD_FORMAT;
255 if ( !init_dib_info_from_bitmapinfo( &dst_dib, dst_info, dst_bits, default_color_table ) )
256 return ERROR_BAD_FORMAT;
258 __TRY
260 dst_dib.funcs->convert_to( &dst_dib, &src_dib, &src->visrect );
261 ret = TRUE;
263 __EXCEPT_PAGE_FAULT
265 WARN( "invalid bits pointer %p\n", src_bits );
266 ret = FALSE;
268 __ENDTRY
270 /* We shared the color tables, so there's no need to free the dib_infos here */
271 if(!ret) return ERROR_BAD_FORMAT;
273 /* update coordinates, the destination rectangle is always stored at 0,0 */
274 src->x -= src->visrect.left;
275 src->y -= src->visrect.top;
276 offset_rect( &src->visrect, -src->visrect.left, -src->visrect.top );
278 if (add_alpha && dst_dib.funcs == &funcs_8888 && src_dib.funcs != &funcs_8888)
280 DWORD *pixel = dst_dib.bits.ptr;
281 int x, y;
283 for (y = src->visrect.top; y < src->visrect.bottom; y++, pixel += dst_dib.stride / 4)
284 for (x = src->visrect.left; x < src->visrect.right; x++)
285 pixel[x] |= 0xff000000;
288 return ERROR_SUCCESS;
291 static void update_fg_colors( dibdrv_physdev *pdev )
293 pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE );
294 pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
295 pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE );
298 static void update_masks( dibdrv_physdev *pdev, INT rop )
300 calc_and_xor_masks( rop, pdev->pen_color, &pdev->pen_and, &pdev->pen_xor );
301 update_brush_rop( pdev, rop );
302 if( GetBkMode( pdev->dev.hdc ) == OPAQUE )
303 calc_and_xor_masks( rop, pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
306 /***********************************************************************
307 * add_extra_clipping_region
309 * Temporarily add a region to the current clipping region.
310 * The returned region must be restored with restore_clipping_region.
312 HRGN add_extra_clipping_region( dibdrv_physdev *pdev, HRGN rgn )
314 HRGN ret, clip;
316 if (!(clip = CreateRectRgn( 0, 0, 0, 0 ))) return 0;
317 CombineRgn( clip, pdev->clip, rgn, RGN_AND );
318 ret = pdev->clip;
319 pdev->clip = clip;
320 return ret;
323 /***********************************************************************
324 * restore_clipping_region
326 void restore_clipping_region( dibdrv_physdev *pdev, HRGN rgn )
328 if (!rgn) return;
329 DeleteObject( pdev->clip );
330 pdev->clip = rgn;
333 /**********************************************************************
334 * dibdrv_CreateDC
336 static BOOL dibdrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
337 LPCWSTR output, const DEVMODEW *data )
339 dibdrv_physdev *pdev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pdev) );
341 if (!pdev) return FALSE;
342 if (!(pdev->clip = CreateRectRgn(0, 0, 0, 0)))
344 HeapFree( GetProcessHeap(), 0, pdev );
345 return FALSE;
347 clear_dib_info(&pdev->dib);
348 clear_dib_info(&pdev->brush_dib);
349 push_dc_driver( dev, &pdev->dev, &dib_driver );
350 return TRUE;
353 /***********************************************************************
354 * dibdrv_DeleteDC
356 static BOOL dibdrv_DeleteDC( PHYSDEV dev )
358 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
359 TRACE("(%p)\n", dev);
360 DeleteObject(pdev->clip);
361 free_pattern_brush(pdev);
362 free_dib_info(&pdev->dib);
363 HeapFree( GetProcessHeap(), 0, pdev );
364 return TRUE;
367 /***********************************************************************
368 * dibdrv_CopyBitmap
370 static BOOL dibdrv_CopyBitmap( HBITMAP src, HBITMAP dst )
372 return nulldrv_CopyBitmap( src, dst );
375 /***********************************************************************
376 * dibdrv_DeleteBitmap
378 static BOOL dibdrv_DeleteBitmap( HBITMAP bitmap )
380 return TRUE;
383 /***********************************************************************
384 * dibdrv_SelectBitmap
386 static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
388 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectBitmap );
389 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
390 BITMAPOBJ *bmp = GDI_GetObjPtr( bitmap, OBJ_BITMAP );
391 TRACE("(%p, %p)\n", dev, bitmap);
393 if (!bmp) return 0;
395 free_dib_info(&pdev->dib);
396 pdev->defer = 0;
397 if(!init_dib_info_from_bitmapobj(&pdev->dib, bmp, default_color_table))
398 pdev->defer |= DEFER_FORMAT;
400 GDI_ReleaseObj( bitmap );
402 return next->funcs->pSelectBitmap( next, bitmap );
405 /***********************************************************************
406 * dibdrv_SetBkColor
408 static COLORREF dibdrv_SetBkColor( PHYSDEV dev, COLORREF color )
410 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkColor );
411 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
413 pdev->bkgnd_color = get_pixel_color( pdev, color, FALSE );
415 if( GetBkMode(dev->hdc) == OPAQUE )
416 calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
417 else
419 pdev->bkgnd_and = ~0u;
420 pdev->bkgnd_xor = 0;
423 update_fg_colors( pdev ); /* Only needed in the 1 bpp case */
425 return next->funcs->pSetBkColor( next, color );
428 /***********************************************************************
429 * dibdrv_SetBkMode
431 static INT dibdrv_SetBkMode( PHYSDEV dev, INT mode )
433 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkMode );
434 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
436 if( mode == OPAQUE )
437 calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
438 else
440 pdev->bkgnd_and = ~0u;
441 pdev->bkgnd_xor = 0;
444 return next->funcs->pSetBkMode( next, mode );
447 /***********************************************************************
448 * dibdrv_SetDeviceClipping
450 static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
452 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDeviceClipping );
453 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
454 TRACE("(%p, %p)\n", dev, rgn);
456 SetRectRgn( pdev->clip, 0, 0, pdev->dib.width, pdev->dib.height );
457 if (rgn) CombineRgn( pdev->clip, pdev->clip, rgn, RGN_AND );
458 return next->funcs->pSetDeviceClipping( next, rgn );
461 /***********************************************************************
462 * dibdrv_SetDIBColorTable
464 static UINT dibdrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RGBQUAD *colors )
466 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDIBColorTable );
467 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
468 TRACE("(%p, %d, %d, %p)\n", dev, pos, count, colors);
470 if (pdev->dib.color_table)
472 pdev->bkgnd_color = get_pixel_color( pdev, GetBkColor( dev->hdc ), FALSE );
473 update_fg_colors( pdev );
475 update_masks( pdev, GetROP2( dev->hdc ) );
477 return next->funcs->pSetDIBColorTable( next, pos, count, colors );
480 /***********************************************************************
481 * dibdrv_SetROP2
483 static INT dibdrv_SetROP2( PHYSDEV dev, INT rop )
485 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetROP2 );
486 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
488 update_masks( pdev, rop );
490 return next->funcs->pSetROP2( next, rop );
493 /***********************************************************************
494 * dibdrv_SetTextColor
496 static COLORREF dibdrv_SetTextColor( PHYSDEV dev, COLORREF color )
498 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetTextColor );
499 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
501 pdev->text_color = get_pixel_color( pdev, color, TRUE );
502 update_aa_ranges( pdev );
504 return next->funcs->pSetTextColor( next, color );
507 const struct gdi_dc_funcs dib_driver =
509 NULL, /* pAbortDoc */
510 NULL, /* pAbortPath */
511 dibdrv_AlphaBlend, /* pAlphaBlend */
512 NULL, /* pAngleArc */
513 NULL, /* pArc */
514 NULL, /* pArcTo */
515 NULL, /* pBeginPath */
516 dibdrv_BlendImage, /* pBlendImage */
517 NULL, /* pChoosePixelFormat */
518 NULL, /* pChord */
519 NULL, /* pCloseFigure */
520 dibdrv_CopyBitmap, /* pCopyBitmap */
521 NULL, /* pCreateBitmap */
522 NULL, /* pCreateCompatibleDC */
523 dibdrv_CreateDC, /* pCreateDC */
524 NULL, /* pCreateDIBSection */
525 dibdrv_DeleteBitmap, /* pDeleteBitmap */
526 dibdrv_DeleteDC, /* pDeleteDC */
527 NULL, /* pDeleteObject */
528 NULL, /* pDescribePixelFormat */
529 NULL, /* pDeviceCapabilities */
530 NULL, /* pEllipse */
531 NULL, /* pEndDoc */
532 NULL, /* pEndPage */
533 NULL, /* pEndPath */
534 NULL, /* pEnumFonts */
535 NULL, /* pEnumICMProfiles */
536 NULL, /* pExcludeClipRect */
537 NULL, /* pExtDeviceMode */
538 NULL, /* pExtEscape */
539 NULL, /* pExtFloodFill */
540 NULL, /* pExtSelectClipRgn */
541 dibdrv_ExtTextOut, /* pExtTextOut */
542 NULL, /* pFillPath */
543 NULL, /* pFillRgn */
544 NULL, /* pFlattenPath */
545 NULL, /* pFontIsLinked */
546 NULL, /* pFrameRgn */
547 NULL, /* pGdiComment */
548 NULL, /* pGdiRealizationInfo */
549 NULL, /* pGetCharABCWidths */
550 NULL, /* pGetCharABCWidthsI */
551 NULL, /* pGetCharWidth */
552 NULL, /* pGetDeviceCaps */
553 NULL, /* pGetDeviceGammaRamp */
554 NULL, /* pGetFontData */
555 NULL, /* pGetFontUnicodeRanges */
556 NULL, /* pGetGlyphIndices */
557 NULL, /* pGetGlyphOutline */
558 NULL, /* pGetICMProfile */
559 dibdrv_GetImage, /* pGetImage */
560 NULL, /* pGetKerningPairs */
561 NULL, /* pGetNearestColor */
562 NULL, /* pGetOutlineTextMetrics */
563 dibdrv_GetPixel, /* pGetPixel */
564 NULL, /* pGetPixelFormat */
565 NULL, /* pGetSystemPaletteEntries */
566 NULL, /* pGetTextCharsetInfo */
567 NULL, /* pGetTextExtentExPoint */
568 NULL, /* pGetTextExtentExPointI */
569 NULL, /* pGetTextFace */
570 NULL, /* pGetTextMetrics */
571 dibdrv_GradientFill, /* pGradientFill */
572 NULL, /* pIntersectClipRect */
573 NULL, /* pInvertRgn */
574 dibdrv_LineTo, /* pLineTo */
575 NULL, /* pModifyWorldTransform */
576 NULL, /* pMoveTo */
577 NULL, /* pOffsetClipRgn */
578 NULL, /* pOffsetViewportOrg */
579 NULL, /* pOffsetWindowOrg */
580 dibdrv_PaintRgn, /* pPaintRgn */
581 dibdrv_PatBlt, /* pPatBlt */
582 NULL, /* pPie */
583 NULL, /* pPolyBezier */
584 NULL, /* pPolyBezierTo */
585 NULL, /* pPolyDraw */
586 NULL, /* pPolyPolygon */
587 dibdrv_PolyPolyline, /* pPolyPolyline */
588 NULL, /* pPolygon */
589 dibdrv_Polyline, /* pPolyline */
590 NULL, /* pPolylineTo */
591 dibdrv_PutImage, /* pPutImage */
592 NULL, /* pRealizeDefaultPalette */
593 NULL, /* pRealizePalette */
594 dibdrv_Rectangle, /* pRectangle */
595 NULL, /* pResetDC */
596 NULL, /* pRestoreDC */
597 NULL, /* pRoundRect */
598 NULL, /* pSaveDC */
599 NULL, /* pScaleViewportExt */
600 NULL, /* pScaleWindowExt */
601 dibdrv_SelectBitmap, /* pSelectBitmap */
602 dibdrv_SelectBrush, /* pSelectBrush */
603 NULL, /* pSelectClipPath */
604 NULL, /* pSelectFont */
605 NULL, /* pSelectPalette */
606 dibdrv_SelectPen, /* pSelectPen */
607 NULL, /* pSetArcDirection */
608 dibdrv_SetBkColor, /* pSetBkColor */
609 dibdrv_SetBkMode, /* pSetBkMode */
610 dibdrv_SetDCBrushColor, /* pSetDCBrushColor */
611 dibdrv_SetDCPenColor, /* pSetDCPenColor */
612 dibdrv_SetDIBColorTable, /* pSetDIBColorTable */
613 NULL, /* pSetDIBitsToDevice */
614 dibdrv_SetDeviceClipping, /* pSetDeviceClipping */
615 NULL, /* pSetDeviceGammaRamp */
616 NULL, /* pSetLayout */
617 NULL, /* pSetMapMode */
618 NULL, /* pSetMapperFlags */
619 dibdrv_SetPixel, /* pSetPixel */
620 NULL, /* pSetPixelFormat */
621 NULL, /* pSetPolyFillMode */
622 dibdrv_SetROP2, /* pSetROP2 */
623 NULL, /* pSetRelAbs */
624 NULL, /* pSetStretchBltMode */
625 NULL, /* pSetTextAlign */
626 NULL, /* pSetTextCharacterExtra */
627 dibdrv_SetTextColor, /* pSetTextColor */
628 NULL, /* pSetTextJustification */
629 NULL, /* pSetViewportExt */
630 NULL, /* pSetViewportOrg */
631 NULL, /* pSetWindowExt */
632 NULL, /* pSetWindowOrg */
633 NULL, /* pSetWorldTransform */
634 NULL, /* pStartDoc */
635 NULL, /* pStartPage */
636 dibdrv_StretchBlt, /* pStretchBlt */
637 NULL, /* pStretchDIBits */
638 NULL, /* pStrokeAndFillPath */
639 NULL, /* pStrokePath */
640 NULL, /* pSwapBuffers */
641 NULL, /* pUnrealizePalette */
642 NULL, /* pWidenPath */
643 NULL, /* pwglCopyContext */
644 NULL, /* pwglCreateContext */
645 NULL, /* pwglCreateContextAttribsARB */
646 NULL, /* pwglDeleteContext */
647 NULL, /* pwglGetPbufferDCARB */
648 NULL, /* pwglGetProcAddress */
649 NULL, /* pwglMakeContextCurrentARB */
650 NULL, /* pwglMakeCurrent */
651 NULL, /* pwglSetPixelFormatWINE */
652 NULL, /* pwglShareLists */
653 NULL, /* pwglUseFontBitmapsA */
654 NULL /* pwglUseFontBitmapsW */