diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 47fa96ff2c5..ea1b1597e59 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -2,7 +2,7 @@ EXTRADEFS = -D_GDI32_ MODULE = gdi32.dll IMPORTLIB = gdi32 IMPORTS = advapi32 -EXTRAINCL = @FREETYPEINCL@ @FONTCONFIGINCL@ @X_CFLAGS@ +EXTRAINCL = @FREETYPEINCL@ @FONTCONFIGINCL@ EXTRALIBS = @CARBONLIB@ DELAYIMPORTS = usp10 diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c index a6b83f0e28e..778fb0b7e2e 100644 --- a/dlls/gdi32/dibdrv/opengl.c +++ b/dlls/gdi32/dibdrv/opengl.c @@ -21,13 +21,6 @@ #include "config.h" #include "wine/port.h" -#ifdef HAVE_GL_OSMESA_H -#include -#undef APIENTRY -#undef GLAPI -#undef WINGDIAPI -#endif - #include "gdi_private.h" #include "dibdrv.h" @@ -38,8 +31,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(dib); #ifdef SONAME_LIBOSMESA +#include "wine/wgl.h" #include "wine/wgl_driver.h" +#define OSMESA_COLOR_INDEX GL_COLOR_INDEX +#define OSMESA_RGBA GL_RGBA +#define OSMESA_BGRA 0x1 +#define OSMESA_ARGB 0x2 +#define OSMESA_RGB GL_RGB +#define OSMESA_BGR 0x4 +#define OSMESA_RGB_565 0x5 +#define OSMESA_ROW_LENGTH 0x10 +#define OSMESA_Y_UP 0x11 + +typedef struct osmesa_context *OSMesaContext; + extern BOOL WINAPI GdiSetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd ); struct wgl_context @@ -54,13 +60,13 @@ static struct opengl_funcs opengl_funcs; static const char *opengl_func_names[] = { ALL_WGL_FUNCS }; #undef USE_GL_FUNC -#define MAKE_FUNCPTR(f) static typeof(f) * p##f; -MAKE_FUNCPTR(OSMesaCreateContextExt) -MAKE_FUNCPTR(OSMesaDestroyContext) -MAKE_FUNCPTR(OSMesaGetProcAddress) -MAKE_FUNCPTR(OSMesaMakeCurrent) -MAKE_FUNCPTR(OSMesaPixelStore) -#undef MAKE_FUNCPTR +static OSMesaContext (*pOSMesaCreateContextExt)( GLenum format, GLint depthBits, GLint stencilBits, + GLint accumBits, OSMesaContext sharelist ); +static void (*pOSMesaDestroyContext)( OSMesaContext ctx ); +static void * (*pOSMesaGetProcAddress)( const char *funcName ); +static GLboolean (*pOSMesaMakeCurrent)( OSMesaContext ctx, void *buffer, GLenum type, + GLsizei width, GLsizei height ); +static void (*pOSMesaPixelStore)( GLint pname, GLint value ); static const struct {