Commit 96e80c26 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Move DescribePixelFormat and SetPixelFormat to the WGL driver.

parent 0316a1b4
...@@ -421,7 +421,6 @@ const struct gdi_dc_funcs dib_driver = ...@@ -421,7 +421,6 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_CreateDC, /* pCreateDC */ dibdrv_CreateDC, /* pCreateDC */
dibdrv_DeleteDC, /* pDeleteDC */ dibdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
dibdrv_DescribePixelFormat, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
dibdrv_Ellipse, /* pEllipse */ dibdrv_Ellipse, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -513,7 +512,6 @@ const struct gdi_dc_funcs dib_driver = ...@@ -513,7 +512,6 @@ const struct gdi_dc_funcs dib_driver =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
dibdrv_SetPixel, /* pSetPixel */ dibdrv_SetPixel, /* pSetPixel */
dibdrv_SetPixelFormat, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -114,7 +114,6 @@ extern DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct g ...@@ -114,7 +114,6 @@ extern DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct g
struct bitblt_coords *src, struct bitblt_coords *dst, BLENDFUNCTION func ) DECLSPEC_HIDDEN; struct bitblt_coords *src, struct bitblt_coords *dst, BLENDFUNCTION func ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom, extern BOOL dibdrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT start_x, INT start_y, INT end_x, INT end_y ) DECLSPEC_HIDDEN; INT start_x, INT start_y, INT end_x, INT end_y ) DECLSPEC_HIDDEN;
extern int dibdrv_DescribePixelFormat( PHYSDEV dev, int fmt, UINT size, PIXELFORMATDESCRIPTOR *descr ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN; extern BOOL dibdrv_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT type ) DECLSPEC_HIDDEN; extern BOOL dibdrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT type ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, extern BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
...@@ -146,7 +145,6 @@ extern HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pat ...@@ -146,7 +145,6 @@ extern HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pat
extern COLORREF dibdrv_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; extern COLORREF dibdrv_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; extern COLORREF dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF dibdrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN; extern COLORREF dibdrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_SetPixelFormat( PHYSDEV dev, int fmt, const PIXELFORMATDESCRIPTOR *descr ) DECLSPEC_HIDDEN;
extern BOOL dibdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, extern BOOL dibdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
PHYSDEV src_dev, struct bitblt_coords *src, DWORD rop ) DECLSPEC_HIDDEN; PHYSDEV src_dev, struct bitblt_coords *src, DWORD rop ) DECLSPEC_HIDDEN;
extern struct opengl_funcs *dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version ) DECLSPEC_HIDDEN; extern struct opengl_funcs *dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version ) DECLSPEC_HIDDEN;
......
...@@ -40,6 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dib); ...@@ -40,6 +40,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dib);
#include "wine/wgl_driver.h" #include "wine/wgl_driver.h"
extern BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd );
struct wgl_context struct wgl_context
{ {
OSMesaContext context; OSMesaContext context;
...@@ -135,9 +137,9 @@ failed: ...@@ -135,9 +137,9 @@ failed:
} }
/********************************************************************** /**********************************************************************
* dibdrv_DescribePixelFormat * dibdrv_wglDescribePixelFormat
*/ */
int dibdrv_DescribePixelFormat( PHYSDEV dev, int fmt, UINT size, PIXELFORMATDESCRIPTOR *descr ) int dibdrv_wglDescribePixelFormat( HDC hdc, int fmt, UINT size, PIXELFORMATDESCRIPTOR *descr )
{ {
int ret = sizeof(pixel_formats) / sizeof(pixel_formats[0]); int ret = sizeof(pixel_formats) / sizeof(pixel_formats[0]);
...@@ -170,22 +172,6 @@ int dibdrv_DescribePixelFormat( PHYSDEV dev, int fmt, UINT size, PIXELFORMATDESC ...@@ -170,22 +172,6 @@ int dibdrv_DescribePixelFormat( PHYSDEV dev, int fmt, UINT size, PIXELFORMATDESC
return ret; return ret;
} }
/**********************************************************************
* dibdrv_SetPixelFormat
*/
BOOL dibdrv_SetPixelFormat( PHYSDEV dev, int fmt, const PIXELFORMATDESCRIPTOR *descr )
{
DC *dc;
BOOL ret = TRUE;
if (fmt <= 0 || fmt > nb_formats) return FALSE;
dc = get_dc_ptr( dev->hdc );
if (!dc->pixel_format) dc->pixel_format = fmt;
else ret = (dc->pixel_format == fmt);
release_dc_ptr( dc );
return ret;
}
/*********************************************************************** /***********************************************************************
* dibdrv_wglCopyContext * dibdrv_wglCopyContext
*/ */
...@@ -300,6 +286,15 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context ) ...@@ -300,6 +286,15 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context )
return ret; return ret;
} }
/**********************************************************************
* dibdrv_wglSetPixelFormat
*/
BOOL dibdrv_wglSetPixelFormat( HDC hdc, int fmt, const PIXELFORMATDESCRIPTOR *descr )
{
if (fmt <= 0 || fmt > nb_formats) return FALSE;
return GdiSetPixelFormat( hdc, fmt, descr );
}
/*********************************************************************** /***********************************************************************
* dibdrv_wglShareLists * dibdrv_wglShareLists
*/ */
...@@ -315,9 +310,11 @@ static struct opengl_funcs opengl_funcs = ...@@ -315,9 +310,11 @@ static struct opengl_funcs opengl_funcs =
dibdrv_wglCopyContext, /* p_wglCopyContext */ dibdrv_wglCopyContext, /* p_wglCopyContext */
dibdrv_wglCreateContext, /* p_wglCreateContext */ dibdrv_wglCreateContext, /* p_wglCreateContext */
dibdrv_wglDeleteContext, /* p_wglDeleteContext */ dibdrv_wglDeleteContext, /* p_wglDeleteContext */
dibdrv_wglDescribePixelFormat,/* p_wglDescribePixelFormat */
dibdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */ dibdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */
dibdrv_wglGetProcAddress, /* p_wglGetProcAddress */ dibdrv_wglGetProcAddress, /* p_wglGetProcAddress */
dibdrv_wglMakeCurrent, /* p_wglMakeCurrent */ dibdrv_wglMakeCurrent, /* p_wglMakeCurrent */
dibdrv_wglSetPixelFormat, /* p_wglSetPixelFormat */
dibdrv_wglShareLists, /* p_wglShareLists */ dibdrv_wglShareLists, /* p_wglShareLists */
} }
}; };
...@@ -341,27 +338,12 @@ struct opengl_funcs *dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version ) ...@@ -341,27 +338,12 @@ struct opengl_funcs *dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
#else /* SONAME_LIBOSMESA */ #else /* SONAME_LIBOSMESA */
/********************************************************************** /**********************************************************************
* dibdrv_DescribePixelFormat
*/
int dibdrv_DescribePixelFormat( PHYSDEV dev, int fmt, UINT size, PIXELFORMATDESCRIPTOR *descr )
{
return 0;
}
/**********************************************************************
* dibdrv_SetPixelFormat
*/
BOOL dibdrv_SetPixelFormat( PHYSDEV dev, int fmt, const PIXELFORMATDESCRIPTOR *descr )
{
return FALSE;
}
/**********************************************************************
* dibdrv_wine_get_wgl_driver * dibdrv_wine_get_wgl_driver
*/ */
struct opengl_funcs *dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version ) struct opengl_funcs *dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
{ {
ERR( "OSMesa not compiled in, no OpenGL bitmap support\n" ); static int warned;
if (!warned++) ERR( "OSMesa not compiled in, no OpenGL bitmap support\n" );
return (void *)-1; return (void *)-1;
} }
......
...@@ -228,11 +228,6 @@ static BOOL nulldrv_DeleteObject( PHYSDEV dev, HGDIOBJ obj ) ...@@ -228,11 +228,6 @@ static BOOL nulldrv_DeleteObject( PHYSDEV dev, HGDIOBJ obj )
return TRUE; return TRUE;
} }
static INT nulldrv_DescribePixelFormat( PHYSDEV dev, INT format, UINT size, PIXELFORMATDESCRIPTOR * descr )
{
return 0;
}
static DWORD nulldrv_DeviceCapabilities( LPSTR buffer, LPCSTR device, LPCSTR port, static DWORD nulldrv_DeviceCapabilities( LPSTR buffer, LPCSTR device, LPCSTR port,
WORD cap, LPSTR output, DEVMODEA *devmode ) WORD cap, LPSTR output, DEVMODEA *devmode )
{ {
...@@ -595,11 +590,6 @@ static COLORREF nulldrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) ...@@ -595,11 +590,6 @@ static COLORREF nulldrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
return color; return color;
} }
static BOOL nulldrv_SetPixelFormat( PHYSDEV dev, INT format, const PIXELFORMATDESCRIPTOR *descr )
{
return FALSE;
}
static INT nulldrv_SetPolyFillMode( PHYSDEV dev, INT mode ) static INT nulldrv_SetPolyFillMode( PHYSDEV dev, INT mode )
{ {
return mode; return mode;
...@@ -681,7 +671,6 @@ const struct gdi_dc_funcs null_driver = ...@@ -681,7 +671,6 @@ const struct gdi_dc_funcs null_driver =
nulldrv_CreateDC, /* pCreateDC */ nulldrv_CreateDC, /* pCreateDC */
nulldrv_DeleteDC, /* pDeleteDC */ nulldrv_DeleteDC, /* pDeleteDC */
nulldrv_DeleteObject, /* pDeleteObject */ nulldrv_DeleteObject, /* pDeleteObject */
nulldrv_DescribePixelFormat, /* pDescribePixelFormat */
nulldrv_DeviceCapabilities, /* pDeviceCapabilities */ nulldrv_DeviceCapabilities, /* pDeviceCapabilities */
nulldrv_Ellipse, /* pEllipse */ nulldrv_Ellipse, /* pEllipse */
nulldrv_EndDoc, /* pEndDoc */ nulldrv_EndDoc, /* pEndDoc */
...@@ -773,7 +762,6 @@ const struct gdi_dc_funcs null_driver = ...@@ -773,7 +762,6 @@ const struct gdi_dc_funcs null_driver =
nulldrv_SetMapMode, /* pSetMapMode */ nulldrv_SetMapMode, /* pSetMapMode */
nulldrv_SetMapperFlags, /* pSetMapperFlags */ nulldrv_SetMapperFlags, /* pSetMapperFlags */
nulldrv_SetPixel, /* pSetPixel */ nulldrv_SetPixel, /* pSetPixel */
nulldrv_SetPixelFormat, /* pSetPixelFormat */
nulldrv_SetPolyFillMode, /* pSetPolyFillMode */ nulldrv_SetPolyFillMode, /* pSetPolyFillMode */
nulldrv_SetROP2, /* pSetROP2 */ nulldrv_SetROP2, /* pSetROP2 */
nulldrv_SetRelAbs, /* pSetRelAbs */ nulldrv_SetRelAbs, /* pSetRelAbs */
......
...@@ -50,7 +50,6 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = ...@@ -50,7 +50,6 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
NULL, /* pCreateDC */ NULL, /* pCreateDC */
EMFDRV_DeleteDC, /* pDeleteDC */ EMFDRV_DeleteDC, /* pDeleteDC */
EMFDRV_DeleteObject, /* pDeleteObject */ EMFDRV_DeleteObject, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
EMFDRV_Ellipse, /* pEllipse */ EMFDRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -142,7 +141,6 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = ...@@ -142,7 +141,6 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
EMFDRV_SetMapMode, /* pSetMapMode */ EMFDRV_SetMapMode, /* pSetMapMode */
EMFDRV_SetMapperFlags, /* pSetMapperFlags */ EMFDRV_SetMapperFlags, /* pSetMapperFlags */
EMFDRV_SetPixel, /* pSetPixel */ EMFDRV_SetPixel, /* pSetPixel */
NULL, /* pSetPixelFormat */
EMFDRV_SetPolyFillMode, /* pSetPolyFillMode */ EMFDRV_SetPolyFillMode, /* pSetPolyFillMode */
EMFDRV_SetROP2, /* pSetROP2 */ EMFDRV_SetROP2, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -7754,7 +7754,6 @@ static const struct gdi_dc_funcs freetype_funcs = ...@@ -7754,7 +7754,6 @@ static const struct gdi_dc_funcs freetype_funcs =
freetype_CreateDC, /* pCreateDC */ freetype_CreateDC, /* pCreateDC */
freetype_DeleteDC, /* pDeleteDC */ freetype_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */ NULL, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -7846,7 +7845,6 @@ static const struct gdi_dc_funcs freetype_funcs = ...@@ -7846,7 +7845,6 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
NULL, /* pSetPixel */ NULL, /* pSetPixel */
NULL, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -113,7 +113,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs = ...@@ -113,7 +113,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
NULL, /* pCreateDC */ NULL, /* pCreateDC */
MFDRV_DeleteDC, /* pDeleteDC */ MFDRV_DeleteDC, /* pDeleteDC */
MFDRV_DeleteObject, /* pDeleteObject */ MFDRV_DeleteObject, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
MFDRV_Ellipse, /* pEllipse */ MFDRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -205,7 +204,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs = ...@@ -205,7 +204,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
MFDRV_SetMapMode, /* pSetMapMode */ MFDRV_SetMapMode, /* pSetMapMode */
MFDRV_SetMapperFlags, /* pSetMapperFlags */ MFDRV_SetMapperFlags, /* pSetMapperFlags */
MFDRV_SetPixel, /* pSetPixel */ MFDRV_SetPixel, /* pSetPixel */
NULL, /* pSetPixelFormat */
MFDRV_SetPolyFillMode, /* pSetPolyFillMode */ MFDRV_SetPolyFillMode, /* pSetPolyFillMode */
MFDRV_SetROP2, /* pSetROP2 */ MFDRV_SetROP2, /* pSetROP2 */
MFDRV_SetRelAbs, /* pSetRelAbs */ MFDRV_SetRelAbs, /* pSetRelAbs */
......
...@@ -490,21 +490,19 @@ COLORREF WINAPI GetPixel( HDC hdc, INT x, INT y ) ...@@ -490,21 +490,19 @@ COLORREF WINAPI GetPixel( HDC hdc, INT x, INT y )
* *
* Probably not the correct semantics, it's supposed to be an internal backend for SetPixelFormat. * Probably not the correct semantics, it's supposed to be an internal backend for SetPixelFormat.
*/ */
BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd) BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR *descr )
{ {
INT bRet = FALSE; DC *dc;
DC * dc = get_dc_ptr( hdc ); BOOL ret = TRUE;
TRACE("(%p,%d,%p)\n",hdc,iPixelFormat,ppfd); TRACE("(%p,%d,%p)\n", hdc, format, descr);
if (dc) if (!(dc = get_dc_ptr( hdc ))) return FALSE;
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetPixelFormat ); if (!dc->pixel_format) dc->pixel_format = format;
update_dc( dc ); else ret = (dc->pixel_format == format);
bRet = physdev->funcs->pSetPixelFormat( physdev, iPixelFormat, ppfd ); release_dc_ptr( dc );
release_dc_ptr( dc ); return ret;
}
return bRet;
} }
...@@ -513,22 +511,10 @@ BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT iPixelFormat, const PIXELFORMATDESCR ...@@ -513,22 +511,10 @@ BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT iPixelFormat, const PIXELFORMATDESCR
* *
* Probably not the correct semantics, it's supposed to be an internal backend for DescribePixelFormat. * Probably not the correct semantics, it's supposed to be an internal backend for DescribePixelFormat.
*/ */
INT WINAPI GdiDescribePixelFormat( HDC hdc, INT iPixelFormat, UINT nBytes, INT WINAPI GdiDescribePixelFormat( HDC hdc, INT format, UINT size, PIXELFORMATDESCRIPTOR *descr )
LPPIXELFORMATDESCRIPTOR ppfd )
{ {
INT ret = 0; FIXME( "(%p,%d,%d,%p): stub\n", hdc, format, size, descr );
DC * dc = get_dc_ptr( hdc ); return 0;
TRACE("(%p,%d,%d,%p): stub\n",hdc,iPixelFormat,nBytes,ppfd);
if (dc)
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pDescribePixelFormat );
update_dc( dc );
ret = physdev->funcs->pDescribePixelFormat( physdev, iPixelFormat, nBytes, ppfd );
release_dc_ptr( dc );
}
return ret;
} }
......
...@@ -2247,7 +2247,6 @@ const struct gdi_dc_funcs path_driver = ...@@ -2247,7 +2247,6 @@ const struct gdi_dc_funcs path_driver =
pathdrv_CreateDC, /* pCreateDC */ pathdrv_CreateDC, /* pCreateDC */
pathdrv_DeleteDC, /* pDeleteDC */ pathdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
pathdrv_Ellipse, /* pEllipse */ pathdrv_Ellipse, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -2339,7 +2338,6 @@ const struct gdi_dc_funcs path_driver = ...@@ -2339,7 +2338,6 @@ const struct gdi_dc_funcs path_driver =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
NULL, /* pSetPixel */ NULL, /* pSetPixel */
NULL, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -622,10 +622,17 @@ my %wgl_functions = ...@@ -622,10 +622,17 @@ my %wgl_functions =
[ "UINT", "mask" ] ] ], [ "UINT", "mask" ] ] ],
"wglCreateContext" => [ "struct wgl_context *", [ [ "HDC", "hdc" ] ] ], "wglCreateContext" => [ "struct wgl_context *", [ [ "HDC", "hdc" ] ] ],
"wglDeleteContext" => [ "void", [ [ "struct wgl_context *", "context" ] ] ], "wglDeleteContext" => [ "void", [ [ "struct wgl_context *", "context" ] ] ],
"wglDescribePixelFormat" => [ "INT", [ [ "HDC", "hdc" ],
[ "INT", "format" ],
[ "UINT", "size" ],
[ "PIXELFORMATDESCRIPTOR *", "descr" ] ] ],
"wglGetPixelFormat" => [ "INT", [ [ "HDC", "hdc" ] ] ], "wglGetPixelFormat" => [ "INT", [ [ "HDC", "hdc" ] ] ],
"wglGetProcAddress" => [ "PROC", [ [ "LPCSTR", "name" ] ] ], "wglGetProcAddress" => [ "PROC", [ [ "LPCSTR", "name" ] ] ],
"wglMakeCurrent" => [ "BOOL", [ [ "HDC", "hdc" ], "wglMakeCurrent" => [ "BOOL", [ [ "HDC", "hdc" ],
[ "struct wgl_context *", "context" ] ] ], [ "struct wgl_context *", "context" ] ] ],
"wglSetPixelFormat" => [ "BOOL", [ [ "HDC", "hdc" ],
[ "INT", "format" ],
[ "const PIXELFORMATDESCRIPTOR *", "descr" ] ] ],
"wglShareLists" => [ "BOOL", [ [ "struct wgl_context *", "org" ], "wglShareLists" => [ "BOOL", [ [ "struct wgl_context *", "org" ],
[ "struct wgl_context *", "dst" ] ] ], [ "struct wgl_context *", "dst" ] ] ],
); );
...@@ -874,6 +881,7 @@ print NORM " ...@@ -874,6 +881,7 @@ print NORM "
#include <stdarg.h> #include <stdarg.h>
#include \"opengl_ext.h\" #include \"opengl_ext.h\"
#include \"winternl.h\" #include \"winternl.h\"
#include \"wingdi.h\"
#include \"wine/wgl_driver.h\" #include \"wine/wgl_driver.h\"
#include \"wine/debug.h\" #include \"wine/debug.h\"
...@@ -913,6 +921,7 @@ print EXT " ...@@ -913,6 +921,7 @@ print EXT "
#include <stdarg.h> #include <stdarg.h>
#include \"opengl_ext.h\" #include \"opengl_ext.h\"
#include \"winternl.h\" #include \"winternl.h\"
#include \"wingdi.h\"
#define WGL_WGLEXT_PROTOTYPES #define WGL_WGLEXT_PROTOTYPES
#include \"wine/wglext.h\" #include \"wine/wglext.h\"
#include \"wine/wgl_driver.h\" #include \"wine/wgl_driver.h\"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <stdarg.h> #include <stdarg.h>
#include "opengl_ext.h" #include "opengl_ext.h"
#include "winternl.h" #include "winternl.h"
#include "wingdi.h"
#define WGL_WGLEXT_PROTOTYPES #define WGL_WGLEXT_PROTOTYPES
#include "wine/wglext.h" #include "wine/wglext.h"
#include "wine/wgl_driver.h" #include "wine/wgl_driver.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <stdarg.h> #include <stdarg.h>
#include "opengl_ext.h" #include "opengl_ext.h"
#include "winternl.h" #include "winternl.h"
#include "wingdi.h"
#include "wine/wgl_driver.h" #include "wine/wgl_driver.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -3027,9 +3028,11 @@ void WINAPI wine_glViewport( GLint x, GLint y, GLsizei width, GLsizei height ) { ...@@ -3027,9 +3028,11 @@ void WINAPI wine_glViewport( GLint x, GLint y, GLsizei width, GLsizei height ) {
static BOOL null_wglCopyContext( struct wgl_context * src, struct wgl_context * dst, UINT mask ) { return 0; } static BOOL null_wglCopyContext( struct wgl_context * src, struct wgl_context * dst, UINT mask ) { return 0; }
static struct wgl_context * null_wglCreateContext( HDC hdc ) { return 0; } static struct wgl_context * null_wglCreateContext( HDC hdc ) { return 0; }
static void null_wglDeleteContext( struct wgl_context * context ) { } static void null_wglDeleteContext( struct wgl_context * context ) { }
static INT null_wglDescribePixelFormat( HDC hdc, INT format, UINT size, PIXELFORMATDESCRIPTOR * descr ) { return 0; }
static INT null_wglGetPixelFormat( HDC hdc ) { return 0; } static INT null_wglGetPixelFormat( HDC hdc ) { return 0; }
static PROC null_wglGetProcAddress( LPCSTR name ) { return 0; } static PROC null_wglGetProcAddress( LPCSTR name ) { return 0; }
static BOOL null_wglMakeCurrent( HDC hdc, struct wgl_context * context ) { return 0; } static BOOL null_wglMakeCurrent( HDC hdc, struct wgl_context * context ) { return 0; }
static BOOL null_wglSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR * descr ) { return 0; }
static BOOL null_wglShareLists( struct wgl_context * org, struct wgl_context * dst ) { return 0; } static BOOL null_wglShareLists( struct wgl_context * org, struct wgl_context * dst ) { return 0; }
static void null_glAccum( GLenum op, GLfloat value ) { } static void null_glAccum( GLenum op, GLfloat value ) { }
static void null_glAlphaFunc( GLenum func, GLfloat ref ) { } static void null_glAlphaFunc( GLenum func, GLfloat ref ) { }
...@@ -3374,9 +3377,11 @@ struct opengl_funcs null_opengl_funcs = ...@@ -3374,9 +3377,11 @@ struct opengl_funcs null_opengl_funcs =
null_wglCopyContext, null_wglCopyContext,
null_wglCreateContext, null_wglCreateContext,
null_wglDeleteContext, null_wglDeleteContext,
null_wglDescribePixelFormat,
null_wglGetPixelFormat, null_wglGetPixelFormat,
null_wglGetProcAddress, null_wglGetProcAddress,
null_wglMakeCurrent, null_wglMakeCurrent,
null_wglSetPixelFormat,
null_wglShareLists, null_wglShareLists,
}, },
#define USE_GL_FUNC(name) null_##name, #define USE_GL_FUNC(name) null_##name,
......
...@@ -50,8 +50,6 @@ extern struct opengl_funcs null_opengl_funcs; ...@@ -50,8 +50,6 @@ extern struct opengl_funcs null_opengl_funcs;
const GLubyte * WINAPI wine_glGetString( GLenum name ); const GLubyte * WINAPI wine_glGetString( GLenum name );
/* internal GDI functions */ /* internal GDI functions */
extern INT WINAPI GdiDescribePixelFormat( HDC hdc, INT fmt, UINT size, PIXELFORMATDESCRIPTOR *pfd );
extern BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd );
extern BOOL WINAPI GdiSwapBuffers( HDC hdc ); extern BOOL WINAPI GdiSwapBuffers( HDC hdc );
/* handle management */ /* handle management */
...@@ -171,15 +169,6 @@ static void free_handle_ptr( struct wgl_handle *ptr ) ...@@ -171,15 +169,6 @@ static void free_handle_ptr( struct wgl_handle *ptr )
} }
/*********************************************************************** /***********************************************************************
* wglSetPixelFormat(OPENGL32.@)
*/
BOOL WINAPI wglSetPixelFormat( HDC hdc, INT iPixelFormat,
const PIXELFORMATDESCRIPTOR *ppfd)
{
return GdiSetPixelFormat(hdc, iPixelFormat, ppfd);
}
/***********************************************************************
* wglCopyContext (OPENGL32.@) * wglCopyContext (OPENGL32.@)
*/ */
BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
...@@ -418,6 +407,16 @@ HGLRC WINAPI wglGetCurrentContext(void) ...@@ -418,6 +407,16 @@ HGLRC WINAPI wglGetCurrentContext(void)
} }
/*********************************************************************** /***********************************************************************
* wglDescribePixelFormat (OPENGL32.@)
*/
INT WINAPI wglDescribePixelFormat(HDC hdc, INT format, UINT size, PIXELFORMATDESCRIPTOR *descr )
{
struct opengl_funcs *funcs = get_dc_funcs( hdc );
if (!funcs) return 0;
return funcs->wgl.p_wglDescribePixelFormat( hdc, format, size, descr );
}
/***********************************************************************
* wglChoosePixelFormat (OPENGL32.@) * wglChoosePixelFormat (OPENGL32.@)
*/ */
INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
...@@ -432,7 +431,7 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) ...@@ -432,7 +431,7 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
ppfd->cColorBits, ppfd->cRedBits, ppfd->cGreenBits, ppfd->cBlueBits, ppfd->cAlphaBits, ppfd->cColorBits, ppfd->cRedBits, ppfd->cGreenBits, ppfd->cBlueBits, ppfd->cAlphaBits,
ppfd->cAccumBits, ppfd->cDepthBits, ppfd->cStencilBits, ppfd->cAuxBuffers ); ppfd->cAccumBits, ppfd->cDepthBits, ppfd->cStencilBits, ppfd->cAuxBuffers );
count = GdiDescribePixelFormat( hdc, 0, 0, NULL ); count = wglDescribePixelFormat( hdc, 0, 0, NULL );
if (!count) return 0; if (!count) return 0;
best_format = 0; best_format = 0;
...@@ -445,7 +444,7 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) ...@@ -445,7 +444,7 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
for (i = 1; i <= count; i++) for (i = 1; i <= count; i++)
{ {
if (!GdiDescribePixelFormat( hdc, i, sizeof(format), &format )) continue; if (!wglDescribePixelFormat( hdc, i, sizeof(format), &format )) continue;
if (ppfd->iPixelType != format.iPixelType) if (ppfd->iPixelType != format.iPixelType)
{ {
...@@ -581,22 +580,23 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) ...@@ -581,22 +580,23 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
} }
/*********************************************************************** /***********************************************************************
* wglDescribePixelFormat (OPENGL32.@) * wglGetPixelFormat (OPENGL32.@)
*/ */
INT WINAPI wglDescribePixelFormat(HDC hdc, INT iPixelFormat, UINT nBytes, INT WINAPI wglGetPixelFormat(HDC hdc)
LPPIXELFORMATDESCRIPTOR ppfd)
{ {
return GdiDescribePixelFormat(hdc, iPixelFormat, nBytes, ppfd); struct opengl_funcs *funcs = get_dc_funcs( hdc );
if (!funcs) return 0;
return funcs->wgl.p_wglGetPixelFormat( hdc );
} }
/*********************************************************************** /***********************************************************************
* wglGetPixelFormat (OPENGL32.@) * wglSetPixelFormat(OPENGL32.@)
*/ */
INT WINAPI wglGetPixelFormat(HDC hdc) BOOL WINAPI wglSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR *descr )
{ {
struct opengl_funcs *funcs = get_dc_funcs( hdc ); struct opengl_funcs *funcs = get_dc_funcs( hdc );
if (!funcs) return 0; if (!funcs) return 0;
return funcs->wgl.p_wglGetPixelFormat( hdc ); return funcs->wgl.p_wglSetPixelFormat( hdc, format, descr );
} }
/*********************************************************************** /***********************************************************************
......
...@@ -724,7 +724,6 @@ static const struct gdi_dc_funcs psdrv_funcs = ...@@ -724,7 +724,6 @@ static const struct gdi_dc_funcs psdrv_funcs =
PSDRV_CreateDC, /* pCreateDC */ PSDRV_CreateDC, /* pCreateDC */
PSDRV_DeleteDC, /* pDeleteDC */ PSDRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
PSDRV_DeviceCapabilities, /* pDeviceCapabilities */ PSDRV_DeviceCapabilities, /* pDeviceCapabilities */
PSDRV_Ellipse, /* pEllipse */ PSDRV_Ellipse, /* pEllipse */
PSDRV_EndDoc, /* pEndDoc */ PSDRV_EndDoc, /* pEndDoc */
...@@ -816,7 +815,6 @@ static const struct gdi_dc_funcs psdrv_funcs = ...@@ -816,7 +815,6 @@ static const struct gdi_dc_funcs psdrv_funcs =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
PSDRV_SetPixel, /* pSetPixel */ PSDRV_SetPixel, /* pSetPixel */
NULL, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -436,31 +436,6 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d ...@@ -436,31 +436,6 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
} }
static inline void opengl_error(void)
{
static int warned;
if (!warned++) ERR("No OpenGL support compiled in.\n");
}
/***********************************************************************
* X11DRV_DescribePixelFormat
*/
static int X11DRV_DescribePixelFormat( PHYSDEV dev, int fmt, UINT size, PIXELFORMATDESCRIPTOR *ppfd )
{
opengl_error();
return 0;
}
/***********************************************************************
* X11DRV_SetPixelFormat
*/
static BOOL X11DRV_SetPixelFormat( PHYSDEV dev, int fmt, const PIXELFORMATDESCRIPTOR *ppfd )
{
opengl_error();
return FALSE;
}
static const struct gdi_dc_funcs x11drv_funcs = static const struct gdi_dc_funcs x11drv_funcs =
{ {
NULL, /* pAbortDoc */ NULL, /* pAbortDoc */
...@@ -477,7 +452,6 @@ static const struct gdi_dc_funcs x11drv_funcs = ...@@ -477,7 +452,6 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_CreateDC, /* pCreateDC */ X11DRV_CreateDC, /* pCreateDC */
X11DRV_DeleteDC, /* pDeleteDC */ X11DRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
X11DRV_DescribePixelFormat, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
X11DRV_Ellipse, /* pEllipse */ X11DRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -569,7 +543,6 @@ static const struct gdi_dc_funcs x11drv_funcs = ...@@ -569,7 +543,6 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
X11DRV_SetPixel, /* pSetPixel */ X11DRV_SetPixel, /* pSetPixel */
X11DRV_SetPixelFormat, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -1161,8 +1161,8 @@ Drawable create_glxpixmap(Display *display, XVisualInfo *vis, Pixmap parent) ...@@ -1161,8 +1161,8 @@ Drawable create_glxpixmap(Display *display, XVisualInfo *vis, Pixmap parent)
* *
* Get the pixel-format descriptor associated to the given id * Get the pixel-format descriptor associated to the given id
*/ */
static int glxdrv_DescribePixelFormat(PHYSDEV dev, int iPixelFormat, static int glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat,
UINT nBytes, PIXELFORMATDESCRIPTOR *ppfd) UINT nBytes, PIXELFORMATDESCRIPTOR *ppfd)
{ {
/*XVisualInfo *vis;*/ /*XVisualInfo *vis;*/
int value; int value;
...@@ -1173,7 +1173,7 @@ static int glxdrv_DescribePixelFormat(PHYSDEV dev, int iPixelFormat, ...@@ -1173,7 +1173,7 @@ static int glxdrv_DescribePixelFormat(PHYSDEV dev, int iPixelFormat,
if (!has_opengl()) return 0; if (!has_opengl()) return 0;
TRACE("(%p,%d,%d,%p)\n", dev->hdc, iPixelFormat, nBytes, ppfd); TRACE("(%p,%d,%d,%p)\n", hdc, iPixelFormat, nBytes, ppfd);
/* Look for the iPixelFormat in our list of supported formats. If it is supported we get the index in the FBConfig table and the number of supported formats back */ /* Look for the iPixelFormat in our list of supported formats. If it is supported we get the index in the FBConfig table and the number of supported formats back */
fmt = ConvertPixelFormatWGLtoGLX(gdi_display, iPixelFormat, FALSE /* Offscreen */, &fmt_count); fmt = ConvertPixelFormatWGLtoGLX(gdi_display, iPixelFormat, FALSE /* Offscreen */, &fmt_count);
...@@ -1335,24 +1335,27 @@ static int glxdrv_wglGetPixelFormat( HDC hdc ) ...@@ -1335,24 +1335,27 @@ static int glxdrv_wglGetPixelFormat( HDC hdc )
} }
/*********************************************************************** /***********************************************************************
* glxdrv_SetPixelFormat * glxdrv_wglSetPixelFormat
*/ */
static BOOL glxdrv_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd) static BOOL glxdrv_wglSetPixelFormat( HDC hdc, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd )
{ {
struct glx_physdev *physdev = get_glxdrv_dev( dev ); struct x11drv_escape_get_drawable escape;
WineGLPixelFormat *fmt; WineGLPixelFormat *fmt;
int value; int value;
HWND hwnd; HWND hwnd;
TRACE("(%p,%d,%p)\n", dev->hdc, iPixelFormat, ppfd); TRACE("(%p,%d,%p)\n", hdc, iPixelFormat, ppfd);
if (!has_opengl()) return FALSE; escape.code = X11DRV_GET_DRAWABLE;
if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code,
sizeof(escape), (LPSTR)&escape ))
return 0;
if(physdev->pixel_format) /* cannot change it if already set */ if (escape.pixel_format) /* cannot change it if already set */
return (physdev->pixel_format == iPixelFormat); return (escape.pixel_format == iPixelFormat);
/* SetPixelFormat is not allowed on the X root_window e.g. GetDC(0) */ /* SetPixelFormat is not allowed on the X root_window e.g. GetDC(0) */
if(physdev->x11dev->drawable == root_window) if (escape.drawable == root_window)
{ {
ERR("Invalid operation on root_window\n"); ERR("Invalid operation on root_window\n");
return FALSE; return FALSE;
...@@ -1369,7 +1372,7 @@ static BOOL glxdrv_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORM ...@@ -1369,7 +1372,7 @@ static BOOL glxdrv_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORM
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value); pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &value);
wine_tsx11_unlock(); wine_tsx11_unlock();
hwnd = WindowFromDC(physdev->dev.hdc); hwnd = WindowFromDC( hdc );
if(hwnd) { if(hwnd) {
if(!(value&GLX_WINDOW_BIT)) { if(!(value&GLX_WINDOW_BIT)) {
WARN("Pixel format %d is not compatible for window rendering\n", iPixelFormat); WARN("Pixel format %d is not compatible for window rendering\n", iPixelFormat);
...@@ -3116,7 +3119,6 @@ static const struct gdi_dc_funcs glxdrv_funcs = ...@@ -3116,7 +3119,6 @@ static const struct gdi_dc_funcs glxdrv_funcs =
glxdrv_CreateDC, /* pCreateDC */ glxdrv_CreateDC, /* pCreateDC */
glxdrv_DeleteDC, /* pDeleteDC */ glxdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
glxdrv_DescribePixelFormat, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */ NULL, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -3208,7 +3210,6 @@ static const struct gdi_dc_funcs glxdrv_funcs = ...@@ -3208,7 +3210,6 @@ static const struct gdi_dc_funcs glxdrv_funcs =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
NULL, /* pSetPixel */ NULL, /* pSetPixel */
glxdrv_SetPixelFormat, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
...@@ -3241,9 +3242,11 @@ static struct opengl_funcs opengl_funcs = ...@@ -3241,9 +3242,11 @@ static struct opengl_funcs opengl_funcs =
glxdrv_wglCopyContext, /* p_wglCopyContext */ glxdrv_wglCopyContext, /* p_wglCopyContext */
glxdrv_wglCreateContext, /* p_wglCreateContext */ glxdrv_wglCreateContext, /* p_wglCreateContext */
glxdrv_wglDeleteContext, /* p_wglDeleteContext */ glxdrv_wglDeleteContext, /* p_wglDeleteContext */
glxdrv_wglDescribePixelFormat, /* p_wglDescribePixelFormat */
glxdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */ glxdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */
glxdrv_wglGetProcAddress, /* p_wglGetProcAddress */ glxdrv_wglGetProcAddress, /* p_wglGetProcAddress */
glxdrv_wglMakeCurrent, /* p_wglMakeCurrent */ glxdrv_wglMakeCurrent, /* p_wglMakeCurrent */
glxdrv_wglSetPixelFormat, /* p_wglSetPixelFormat */
glxdrv_wglShareLists, /* p_wglShareLists */ glxdrv_wglShareLists, /* p_wglShareLists */
} }
}; };
......
...@@ -2480,7 +2480,6 @@ static const struct gdi_dc_funcs xrender_funcs = ...@@ -2480,7 +2480,6 @@ static const struct gdi_dc_funcs xrender_funcs =
xrenderdrv_CreateDC, /* pCreateDC */ xrenderdrv_CreateDC, /* pCreateDC */
xrenderdrv_DeleteDC, /* pDeleteDC */ xrenderdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */ NULL, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
...@@ -2572,7 +2571,6 @@ static const struct gdi_dc_funcs xrender_funcs = ...@@ -2572,7 +2571,6 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
NULL, /* pSetPixel */ NULL, /* pSetPixel */
NULL, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
......
...@@ -76,7 +76,6 @@ struct gdi_dc_funcs ...@@ -76,7 +76,6 @@ struct gdi_dc_funcs
BOOL (*pCreateDC)(PHYSDEV*,LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*); BOOL (*pCreateDC)(PHYSDEV*,LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
BOOL (*pDeleteDC)(PHYSDEV); BOOL (*pDeleteDC)(PHYSDEV);
BOOL (*pDeleteObject)(PHYSDEV,HGDIOBJ); BOOL (*pDeleteObject)(PHYSDEV,HGDIOBJ);
INT (*pDescribePixelFormat)(PHYSDEV,INT,UINT,PIXELFORMATDESCRIPTOR *);
DWORD (*pDeviceCapabilities)(LPSTR,LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA); DWORD (*pDeviceCapabilities)(LPSTR,LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA);
BOOL (*pEllipse)(PHYSDEV,INT,INT,INT,INT); BOOL (*pEllipse)(PHYSDEV,INT,INT,INT,INT);
INT (*pEndDoc)(PHYSDEV); INT (*pEndDoc)(PHYSDEV);
...@@ -168,7 +167,6 @@ struct gdi_dc_funcs ...@@ -168,7 +167,6 @@ struct gdi_dc_funcs
INT (*pSetMapMode)(PHYSDEV,INT); INT (*pSetMapMode)(PHYSDEV,INT);
DWORD (*pSetMapperFlags)(PHYSDEV,DWORD); DWORD (*pSetMapperFlags)(PHYSDEV,DWORD);
COLORREF (*pSetPixel)(PHYSDEV,INT,INT,COLORREF); COLORREF (*pSetPixel)(PHYSDEV,INT,INT,COLORREF);
BOOL (*pSetPixelFormat)(PHYSDEV,INT,const PIXELFORMATDESCRIPTOR *);
INT (*pSetPolyFillMode)(PHYSDEV,INT); INT (*pSetPolyFillMode)(PHYSDEV,INT);
INT (*pSetROP2)(PHYSDEV,INT); INT (*pSetROP2)(PHYSDEV,INT);
INT (*pSetRelAbs)(PHYSDEV,INT); INT (*pSetRelAbs)(PHYSDEV,INT);
...@@ -198,7 +196,7 @@ struct gdi_dc_funcs ...@@ -198,7 +196,7 @@ struct gdi_dc_funcs
}; };
/* increment this when you change the DC function table */ /* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 42 #define WINE_GDI_DRIVER_VERSION 43
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define WINE_GLAPI #define WINE_GLAPI
#endif #endif
#define WINE_WGL_DRIVER_VERSION 5 #define WINE_WGL_DRIVER_VERSION 6
struct wgl_context; struct wgl_context;
struct wgl_pbuffer; struct wgl_pbuffer;
...@@ -19,9 +19,11 @@ struct opengl_funcs ...@@ -19,9 +19,11 @@ struct opengl_funcs
BOOL (WINE_GLAPI *p_wglCopyContext)(struct wgl_context *,struct wgl_context *,UINT); BOOL (WINE_GLAPI *p_wglCopyContext)(struct wgl_context *,struct wgl_context *,UINT);
struct wgl_context * (WINE_GLAPI *p_wglCreateContext)(HDC); struct wgl_context * (WINE_GLAPI *p_wglCreateContext)(HDC);
void (WINE_GLAPI *p_wglDeleteContext)(struct wgl_context *); void (WINE_GLAPI *p_wglDeleteContext)(struct wgl_context *);
INT (WINE_GLAPI *p_wglDescribePixelFormat)(HDC,INT,UINT,PIXELFORMATDESCRIPTOR *);
INT (WINE_GLAPI *p_wglGetPixelFormat)(HDC); INT (WINE_GLAPI *p_wglGetPixelFormat)(HDC);
PROC (WINE_GLAPI *p_wglGetProcAddress)(LPCSTR); PROC (WINE_GLAPI *p_wglGetProcAddress)(LPCSTR);
BOOL (WINE_GLAPI *p_wglMakeCurrent)(HDC,struct wgl_context *); BOOL (WINE_GLAPI *p_wglMakeCurrent)(HDC,struct wgl_context *);
BOOL (WINE_GLAPI *p_wglSetPixelFormat)(HDC,INT,const PIXELFORMATDESCRIPTOR *);
BOOL (WINE_GLAPI *p_wglShareLists)(struct wgl_context *,struct wgl_context *); BOOL (WINE_GLAPI *p_wglShareLists)(struct wgl_context *,struct wgl_context *);
} wgl; } wgl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment