ddraw: load OpenGL at runtime
Mike McCormack
mike at codeweavers.com
Fri May 16 00:01:01 CDT 2003
Hi Lionel,
Lionel Ulmer wrote:
> So it's not something that it's likely to be in Wine before at least 2
> months (we are currently too busy adding features to get finally games
> working to work on this :-) ).
Well, I have time, and I can work on that if you let me know what to do.
For example, where do you want to put the library in the wine tree?
> And for the patch to be comitted :
>
> - no 'diff -u' please, it kills indentation in all the code where you added
> the 'if (opengl_initialized)' tests
> - configure creates a 'SONAME_LIBGL' for you (instead of hard-coding to
> libGL.so).
> - what is this 'WINE_MESSAGE' stuff ? Why not use the 'ddraw' channel ?
OK, how does this one look?
Mike
-------------- next part --------------
? dlls/ddraw/ddraw_opengl.diff
? dlls/ddraw/ddraw_opengl3.diff
? dlls/ddraw/gl_private.h
Index: dlls/ddraw/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/Makefile.in,v
retrieving revision 1.28
diff -u -r1.28 Makefile.in
--- dlls/ddraw/Makefile.in 21 Nov 2002 21:04:16 -0000 1.28
+++ dlls/ddraw/Makefile.in 16 May 2003 04:33:43 -0000
@@ -5,7 +5,7 @@
MODULE = ddraw.dll
IMPORTS = user32 gdi32 kernel32
EXTRAINCL = @X_CFLAGS@
-EXTRALIBS = $(LIBUUID) @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ @OPENGL_LIBS@
+EXTRALIBS = $(LIBUUID) @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
Index: dlls/ddraw/ddraw_private.h
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw_private.h,v
retrieving revision 1.35
diff -u -r1.35 ddraw_private.h
--- dlls/ddraw/ddraw_private.h 2 Jan 2003 19:51:25 -0000 1.35
+++ dlls/ddraw/ddraw_private.h 16 May 2003 04:33:44 -0000
@@ -353,6 +353,7 @@
extern Convert ModeEmulations[8];
extern int _common_depth_to_pixelformat(DWORD depth,LPDIRECTDRAW ddraw);
+extern BOOL opengl_initialized;
/******************************************************************************
* Structure conversion (for thunks)
Index: dlls/ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/main.c,v
retrieving revision 1.31
diff -u -r1.31 main.c
--- dlls/ddraw/main.c 15 Mar 2003 00:12:43 -0000 1.31
+++ dlls/ddraw/main.c 16 May 2003 04:33:44 -0000
@@ -37,6 +37,11 @@
/* This for all the enumeration and creation of D3D-related objects */
#include "ddraw_private.h"
#include "wine/debug.h"
+#include "wine/library.h"
+#include "wine/port.h"
+
+#define GLPRIVATE_NO_REDEFINE
+#include "gl_private.h"
#define MAX_DDRAW_DRIVERS 3
static const ddraw_driver* DDRAW_drivers[MAX_DDRAW_DRIVERS];
@@ -55,6 +60,185 @@
LPVOID lpContext;
} DirectDrawEnumerateProcData;
+#ifdef HAVE_OPENGL
+
+static void *gl_handle = NULL;
+BOOL opengl_initialized = 0;
+
+#define MAKE_FUNCPTR(f) typeof(f) * p##f = NULL;
+
+MAKE_FUNCPTR(glAlphaFunc)
+MAKE_FUNCPTR(glBegin)
+MAKE_FUNCPTR(glBindTexture)
+MAKE_FUNCPTR(glBlendFunc)
+MAKE_FUNCPTR(glClear)
+MAKE_FUNCPTR(glClearColor)
+MAKE_FUNCPTR(glClearDepth)
+MAKE_FUNCPTR(glClearStencil)
+MAKE_FUNCPTR(glClipPlane)
+MAKE_FUNCPTR(glColor3f)
+MAKE_FUNCPTR(glColor3ub)
+MAKE_FUNCPTR(glColor4ub)
+MAKE_FUNCPTR(glColorMaterial)
+MAKE_FUNCPTR(glCullFace)
+MAKE_FUNCPTR(glDeleteTextures)
+MAKE_FUNCPTR(glDepthFunc)
+MAKE_FUNCPTR(glDepthMask)
+MAKE_FUNCPTR(glDisable)
+MAKE_FUNCPTR(glDrawBuffer)
+MAKE_FUNCPTR(glDrawPixels)
+MAKE_FUNCPTR(glEnable)
+MAKE_FUNCPTR(glEnd)
+MAKE_FUNCPTR(glFlush)
+MAKE_FUNCPTR(glFogf)
+MAKE_FUNCPTR(glFogfv)
+MAKE_FUNCPTR(glFogi)
+MAKE_FUNCPTR(glFrontFace)
+MAKE_FUNCPTR(glGenTextures)
+MAKE_FUNCPTR(glGetBooleanv)
+MAKE_FUNCPTR(glGetFloatv)
+MAKE_FUNCPTR(glGetIntegerv)
+MAKE_FUNCPTR(glHint)
+MAKE_FUNCPTR(glLightModelfv)
+MAKE_FUNCPTR(glLightModeli)
+MAKE_FUNCPTR(glLightfv)
+MAKE_FUNCPTR(glLoadIdentity)
+MAKE_FUNCPTR(glLoadMatrixf)
+MAKE_FUNCPTR(glMaterialf)
+MAKE_FUNCPTR(glMaterialfv)
+MAKE_FUNCPTR(glMatrixMode)
+MAKE_FUNCPTR(glMultMatrixf)
+MAKE_FUNCPTR(glNormal3f)
+MAKE_FUNCPTR(glNormal3fv)
+MAKE_FUNCPTR(glPolygonMode)
+MAKE_FUNCPTR(glPolygonOffset)
+MAKE_FUNCPTR(glPopMatrix)
+MAKE_FUNCPTR(glPushMatrix)
+MAKE_FUNCPTR(glRasterPos2f)
+MAKE_FUNCPTR(glReadBuffer)
+MAKE_FUNCPTR(glReadPixels)
+MAKE_FUNCPTR(glShadeModel)
+MAKE_FUNCPTR(glStencilFunc)
+MAKE_FUNCPTR(glStencilMask)
+MAKE_FUNCPTR(glStencilOp)
+MAKE_FUNCPTR(glTexCoord2f)
+MAKE_FUNCPTR(glTexCoord2fv)
+MAKE_FUNCPTR(glTexEnvi)
+MAKE_FUNCPTR(glTexImage2D)
+MAKE_FUNCPTR(glTexParameteri)
+MAKE_FUNCPTR(glTexParameterfv)
+MAKE_FUNCPTR(glTexSubImage2D)
+MAKE_FUNCPTR(glTranslatef)
+MAKE_FUNCPTR(glVertex3f)
+MAKE_FUNCPTR(glVertex3fv)
+MAKE_FUNCPTR(glVertex4f)
+MAKE_FUNCPTR(glXCreateContext)
+MAKE_FUNCPTR(glXDestroyContext)
+MAKE_FUNCPTR(glXMakeCurrent)
+MAKE_FUNCPTR(glXSwapBuffers)
+
+#undef MAKE_FUNCPTR
+
+static BOOL DDRAW_bind_to_opengl( void )
+{
+ char *glname = SONAME_LIBGL;
+
+ gl_handle = wine_dlopen(glname, RTLD_NOW, NULL, 0);
+ if(!gl_handle) {
+ ERR("Wine cannot find the OpenGL graphics library (%s).\n",glname);
+ return FALSE;
+ }
+
+#define LOAD_FUNCPTR(f) \
+ if((p##f = wine_dlsym(gl_handle, #f, NULL, 0)) == NULL) \
+ { \
+ WARN("Can't find symbol %s\n", #f); \
+ goto sym_not_found; \
+ }
+
+ LOAD_FUNCPTR(glAlphaFunc)
+ LOAD_FUNCPTR(glBegin)
+ LOAD_FUNCPTR(glBindTexture)
+ LOAD_FUNCPTR(glBlendFunc)
+ LOAD_FUNCPTR(glClear)
+ LOAD_FUNCPTR(glClearColor)
+ LOAD_FUNCPTR(glClearDepth)
+ LOAD_FUNCPTR(glClearStencil)
+ LOAD_FUNCPTR(glClipPlane)
+ LOAD_FUNCPTR(glColor3f)
+ LOAD_FUNCPTR(glColor3ub)
+ LOAD_FUNCPTR(glColor4ub)
+ LOAD_FUNCPTR(glColorMaterial)
+ LOAD_FUNCPTR(glCullFace)
+ LOAD_FUNCPTR(glDeleteTextures)
+ LOAD_FUNCPTR(glDepthFunc)
+ LOAD_FUNCPTR(glDepthMask)
+ LOAD_FUNCPTR(glDisable)
+ LOAD_FUNCPTR(glDrawBuffer)
+ LOAD_FUNCPTR(glDrawPixels)
+ LOAD_FUNCPTR(glEnable)
+ LOAD_FUNCPTR(glEnd)
+ LOAD_FUNCPTR(glFlush)
+ LOAD_FUNCPTR(glFogf)
+ LOAD_FUNCPTR(glFogfv)
+ LOAD_FUNCPTR(glFogi)
+ LOAD_FUNCPTR(glFrontFace)
+ LOAD_FUNCPTR(glGenTextures)
+ LOAD_FUNCPTR(glGetBooleanv)
+ LOAD_FUNCPTR(glGetFloatv)
+ LOAD_FUNCPTR(glGetIntegerv)
+ LOAD_FUNCPTR(glHint)
+ LOAD_FUNCPTR(glLightModelfv)
+ LOAD_FUNCPTR(glLightModeli)
+ LOAD_FUNCPTR(glLightfv)
+ LOAD_FUNCPTR(glLoadIdentity)
+ LOAD_FUNCPTR(glLoadMatrixf)
+ LOAD_FUNCPTR(glMaterialf)
+ LOAD_FUNCPTR(glMaterialfv)
+ LOAD_FUNCPTR(glMatrixMode)
+ LOAD_FUNCPTR(glMultMatrixf)
+ LOAD_FUNCPTR(glNormal3f)
+ LOAD_FUNCPTR(glNormal3fv)
+ LOAD_FUNCPTR(glPolygonMode)
+ LOAD_FUNCPTR(glPolygonOffset)
+ LOAD_FUNCPTR(glPopMatrix)
+ LOAD_FUNCPTR(glPushMatrix)
+ LOAD_FUNCPTR(glRasterPos2f)
+ LOAD_FUNCPTR(glReadBuffer)
+ LOAD_FUNCPTR(glReadPixels)
+ LOAD_FUNCPTR(glShadeModel)
+ LOAD_FUNCPTR(glStencilFunc)
+ LOAD_FUNCPTR(glStencilMask)
+ LOAD_FUNCPTR(glStencilOp)
+ LOAD_FUNCPTR(glTexCoord2f)
+ LOAD_FUNCPTR(glTexCoord2fv)
+ LOAD_FUNCPTR(glTexEnvi)
+ LOAD_FUNCPTR(glTexImage2D)
+ LOAD_FUNCPTR(glTexParameteri)
+ LOAD_FUNCPTR(glTexSubImage2D)
+ LOAD_FUNCPTR(glTranslatef)
+ LOAD_FUNCPTR(glVertex3f)
+ LOAD_FUNCPTR(glVertex3fv)
+ LOAD_FUNCPTR(glVertex4f)
+ LOAD_FUNCPTR(glXCreateContext)
+ LOAD_FUNCPTR(glXDestroyContext)
+ LOAD_FUNCPTR(glXMakeCurrent)
+ LOAD_FUNCPTR(glXSwapBuffers)
+#undef LOAD_FUNCPTR
+
+ return TRUE;
+
+sym_not_found:
+ ERR("Wine cannot find certain functions that it needs inside the OpenGL\n"
+ "graphics library. To enable Wine to use OpenGL please upgrade\n"
+ "your OpenGL libraries\n");
+ wine_dlclose(gl_handle, NULL, 0);
+ gl_handle = NULL;
+ return FALSE;
+}
+
+#endif /* HAVE_OPENGL */
+
/***********************************************************************
* DirectDrawEnumerateExA (DDRAW.@)
*/
@@ -531,6 +715,9 @@
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
}
+#ifdef HAVE_OPENGL
+ opengl_initialized = DDRAW_bind_to_opengl();
+#endif /* HAVE_OPENGL */
}
if (DDRAW_num_drivers > 0)
Index: dlls/ddraw/mesa_private.h
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/mesa_private.h,v
retrieving revision 1.42
diff -u -r1.42 mesa_private.h
--- dlls/ddraw/mesa_private.h 12 May 2003 03:09:17 -0000 1.42
+++ dlls/ddraw/mesa_private.h 16 May 2003 04:33:44 -0000
@@ -26,26 +26,7 @@
#ifdef HAVE_OPENGL
-#undef APIENTRY
-#undef CALLBACK
-#undef WINAPI
-
-#define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */
-#include <GL/gl.h>
-#include <GL/glx.h>
-#ifdef HAVE_GL_GLEXT_H
-# include <GL/glext.h>
-#endif
-#undef XMD_H
-
-#undef APIENTRY
-#undef CALLBACK
-#undef WINAPI
-
-/* Redefines the constants */
-#define CALLBACK __stdcall
-#define WINAPI __stdcall
-#define APIENTRY WINAPI
+#include "gl_private.h"
/* X11 locking */
Index: dlls/ddraw/ddraw/hal.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/hal.c,v
retrieving revision 1.9
diff -u -r1.9 hal.c
--- dlls/ddraw/ddraw/hal.c 13 Jan 2003 18:30:47 -0000 1.9
+++ dlls/ddraw/ddraw/hal.c 16 May 2003 04:33:45 -0000
@@ -139,8 +139,10 @@
}
#ifdef HAVE_OPENGL
- if (d3d_hal_data.hwCaps.dwFlags & D3DDD_WINE_OPENGL_DEVICE) {
- /*GL_DirectDraw_Init(&dd_gbl);*/
+ if( opengl_initialized ) {
+ if (d3d_hal_data.hwCaps.dwFlags & D3DDD_WINE_OPENGL_DEVICE) {
+ /*GL_DirectDraw_Init(&dd_gbl);*/
+ }
}
#endif
Index: dlls/ddraw/ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/main.c,v
retrieving revision 1.40
diff -u -r1.40 main.c
--- dlls/ddraw/ddraw/main.c 11 May 2003 03:46:53 -0000 1.40
+++ dlls/ddraw/ddraw/main.c 16 May 2003 04:33:45 -0000
@@ -179,10 +179,11 @@
*obj = ICOM_INTERFACE(This, IDirectDraw4);
}
#ifdef HAVE_OPENGL
- else if ( IsEqualGUID( &IID_IDirect3D , refiid ) ||
+ else if ( opengl_initialized &&
+ ( IsEqualGUID( &IID_IDirect3D , refiid ) ||
IsEqualGUID( &IID_IDirect3D2 , refiid ) ||
IsEqualGUID( &IID_IDirect3D3 , refiid ) ||
- IsEqualGUID( &IID_IDirect3D7 , refiid ) )
+ IsEqualGUID( &IID_IDirect3D7 , refiid ) ) )
{
IDirect3DImpl *d3d_impl;
HRESULT ret_value;
Index: dlls/ddraw/ddraw/user.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/user.c,v
retrieving revision 1.15
diff -u -r1.15 user.c
--- dlls/ddraw/ddraw/user.c 7 Mar 2003 20:34:34 -0000 1.15
+++ dlls/ddraw/ddraw/user.c 16 May 2003 04:33:46 -0000
@@ -174,8 +174,11 @@
| DDFXCAPS_BLTSTRETCHY | DDFXCAPS_BLTSTRETCHYN)
This->caps.dwCaps |= DDCAPS_GDI | DDCAPS_PALETTE | BLIT_CAPS;
#ifdef HAVE_OPENGL
- /* Hack for D3D code */
- This->caps.dwCaps |= DDCAPS_3D;
+ if( opengl_initialized )
+ {
+ /* Hack for D3D code */
+ This->caps.dwCaps |= DDCAPS_3D;
+ }
#endif /* HAVE_OPENGL */
This->caps.dwCaps2 |= DDCAPS2_CERTIFIED | DDCAPS2_NOPAGELOCKREQUIRED |
DDCAPS2_PRIMARYGAMMA | DDCAPS2_WIDESURFACES;
@@ -199,8 +202,11 @@
DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY |
DDSCAPS_VIDEOMEMORY | DDSCAPS_VISIBLE;
#ifdef HAVE_OPENGL
- /* Hacks for D3D code */
- This->caps.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE | DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_ZBUFFER;
+ if( opengl_initialized )
+ {
+ /* Hacks for D3D code */
+ This->caps.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE | DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_ZBUFFER;
+ }
#endif /* HAVE_OPENGL */
This->caps.ddsOldCaps.dwCaps = This->caps.ddsCaps.dwCaps;
Index: dlls/ddraw/dsurface/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/main.c,v
retrieving revision 1.46
diff -u -r1.46 main.c
--- dlls/ddraw/dsurface/main.c 15 Mar 2003 01:11:14 -0000 1.46
+++ dlls/ddraw/dsurface/main.c 16 May 2003 04:33:46 -0000
@@ -179,48 +179,51 @@
return S_OK;
}
#ifdef HAVE_OPENGL
- else if ( IsEqualGUID( &IID_D3DDEVICE_OpenGL, riid ) ||
- IsEqualGUID( &IID_IDirect3DHALDevice, riid) )
+ else if( opengl_initialized )
{
- IDirect3DDeviceImpl *d3ddevimpl;
- HRESULT ret_value;
+ if ( IsEqualGUID( &IID_D3DDEVICE_OpenGL, riid ) ||
+ IsEqualGUID( &IID_IDirect3DHALDevice, riid) )
+ {
+ IDirect3DDeviceImpl *d3ddevimpl;
+ HRESULT ret_value;
- ret_value = d3ddevice_create(&d3ddevimpl, This->ddraw_owner->d3d, This);
- if (FAILED(ret_value)) return ret_value;
+ ret_value = d3ddevice_create(&d3ddevimpl, This->ddraw_owner->d3d, This);
+ if (FAILED(ret_value)) return ret_value;
- *ppObj = ICOM_INTERFACE(d3ddevimpl, IDirect3DDevice);
- TRACE(" returning Direct3DDevice interface at %p.\n", *ppObj);
+ *ppObj = ICOM_INTERFACE(d3ddevimpl, IDirect3DDevice);
+ TRACE(" returning Direct3DDevice interface at %p.\n", *ppObj);
- This->ref++; /* No idea if this is correct.. Need to check using real Windows */
- return ret_value;
- }
- else if (IsEqualGUID( &IID_IDirect3DTexture, riid ) ||
- IsEqualGUID( &IID_IDirect3DTexture2, riid ))
- {
- HRESULT ret_value = S_OK;
+ This->ref++; /* No idea if this is correct.. Need to check using real Windows */
+ return ret_value;
+ }
+ else if (IsEqualGUID( &IID_IDirect3DTexture, riid ) ||
+ IsEqualGUID( &IID_IDirect3DTexture2, riid ))
+ {
+ HRESULT ret_value = S_OK;
- if ((This->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE) == 0) return E_NOINTERFACE;
+ if ((This->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE) == 0) return E_NOINTERFACE;
- /* In case the texture surface was created before the D3D creation */
- if (This->tex_private == NULL) {
- if (This->ddraw_owner->d3d == NULL) {
- ERR("Texture created with no D3D object yet.. Not supported !\n");
- return E_NOINTERFACE;
- }
+ /* In case the texture surface was created before the D3D creation */
+ if (This->tex_private == NULL) {
+ if (This->ddraw_owner->d3d == NULL) {
+ ERR("Texture created with no D3D object yet.. Not supported !\n");
+ return E_NOINTERFACE;
+ }
- ret_value = This->ddraw_owner->d3d->create_texture(This->ddraw_owner->d3d, This, FALSE, This->mip_main);
- if (FAILED(ret_value)) return ret_value;
- }
- if (IsEqualGUID( &IID_IDirect3DTexture, riid )) {
- *ppObj = ICOM_INTERFACE(This, IDirect3DTexture);
- TRACE(" returning Direct3DTexture interface at %p.\n", *ppObj);
- } else {
- *ppObj = ICOM_INTERFACE(This, IDirect3DTexture2);
- TRACE(" returning Direct3DTexture2 interface at %p.\n", *ppObj);
- }
- This->ref++;
- return ret_value;
- }
+ ret_value = This->ddraw_owner->d3d->create_texture(This->ddraw_owner->d3d, This, FALSE, This->mip_main);
+ if (FAILED(ret_value)) return ret_value;
+ }
+ if (IsEqualGUID( &IID_IDirect3DTexture, riid )) {
+ *ppObj = ICOM_INTERFACE(This, IDirect3DTexture);
+ TRACE(" returning Direct3DTexture interface at %p.\n", *ppObj);
+ } else {
+ *ppObj = ICOM_INTERFACE(This, IDirect3DTexture2);
+ TRACE(" returning Direct3DTexture2 interface at %p.\n", *ppObj);
+ }
+ This->ref++;
+ return ret_value;
+ }
+ }
#endif
return E_NOINTERFACE;
--- /dev/null 1994-07-18 08:46:18.000000000 +0900
+++ dlls/ddraw/gl_private.h 2003-05-15 14:12:26.000000000 +0900
@@ -0,0 +1,178 @@
+
+#ifndef __GRAPHICS_WINE_GL_PRIVATE_H
+#define __GRAPHICS_WINE_GL_PRIVATE_H
+
+#ifdef HAVE_OPENGL
+
+#undef APIENTRY
+#undef CALLBACK
+#undef WINAPI
+
+#define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */
+#include <GL/gl.h>
+#include <GL/glx.h>
+#ifdef HAVE_GL_GLEXT_H
+# include <GL/glext.h>
+#endif
+#undef XMD_H
+
+#undef APIENTRY
+#undef CALLBACK
+#undef WINAPI
+
+/* Redefines the constants */
+#define CALLBACK __stdcall
+#define WINAPI __stdcall
+#define APIENTRY WINAPI
+
+#define MAKE_FUNCPTR(f) extern typeof(f) * p##f;
+
+MAKE_FUNCPTR(glAlphaFunc)
+MAKE_FUNCPTR(glBegin)
+MAKE_FUNCPTR(glBindTexture)
+MAKE_FUNCPTR(glBlendFunc)
+MAKE_FUNCPTR(glClear)
+MAKE_FUNCPTR(glClearColor)
+MAKE_FUNCPTR(glClearDepth)
+MAKE_FUNCPTR(glClearStencil)
+MAKE_FUNCPTR(glClipPlane)
+MAKE_FUNCPTR(glColor3f)
+MAKE_FUNCPTR(glColor3ub)
+MAKE_FUNCPTR(glColor4ub)
+MAKE_FUNCPTR(glColorMaterial)
+MAKE_FUNCPTR(glCullFace)
+MAKE_FUNCPTR(glDeleteTextures)
+MAKE_FUNCPTR(glDepthFunc)
+MAKE_FUNCPTR(glDepthMask)
+MAKE_FUNCPTR(glDisable)
+MAKE_FUNCPTR(glDrawBuffer)
+MAKE_FUNCPTR(glDrawPixels)
+MAKE_FUNCPTR(glEnable)
+MAKE_FUNCPTR(glEnd)
+MAKE_FUNCPTR(glFlush)
+MAKE_FUNCPTR(glFogf)
+MAKE_FUNCPTR(glFogfv)
+MAKE_FUNCPTR(glFogi)
+MAKE_FUNCPTR(glFrontFace)
+MAKE_FUNCPTR(glGenTextures)
+MAKE_FUNCPTR(glGetBooleanv)
+MAKE_FUNCPTR(glGetFloatv)
+MAKE_FUNCPTR(glGetIntegerv)
+MAKE_FUNCPTR(glHint)
+MAKE_FUNCPTR(glLightModelfv)
+MAKE_FUNCPTR(glLightModeli)
+MAKE_FUNCPTR(glLightfv)
+MAKE_FUNCPTR(glLoadIdentity)
+MAKE_FUNCPTR(glLoadMatrixf)
+MAKE_FUNCPTR(glMaterialf)
+MAKE_FUNCPTR(glMaterialfv)
+MAKE_FUNCPTR(glMatrixMode)
+MAKE_FUNCPTR(glMultMatrixf)
+MAKE_FUNCPTR(glNormal3f)
+MAKE_FUNCPTR(glNormal3fv)
+MAKE_FUNCPTR(glPolygonMode)
+MAKE_FUNCPTR(glPolygonOffset)
+MAKE_FUNCPTR(glPopMatrix)
+MAKE_FUNCPTR(glPushMatrix)
+MAKE_FUNCPTR(glRasterPos2f)
+MAKE_FUNCPTR(glReadBuffer)
+MAKE_FUNCPTR(glReadPixels)
+MAKE_FUNCPTR(glShadeModel)
+MAKE_FUNCPTR(glStencilFunc)
+MAKE_FUNCPTR(glStencilMask)
+MAKE_FUNCPTR(glStencilOp)
+MAKE_FUNCPTR(glTexCoord2f)
+MAKE_FUNCPTR(glTexCoord2fv)
+MAKE_FUNCPTR(glTexEnvi)
+MAKE_FUNCPTR(glTexImage2D)
+MAKE_FUNCPTR(glTexParameteri)
+MAKE_FUNCPTR(glTexParameterfv)
+MAKE_FUNCPTR(glTexSubImage2D)
+MAKE_FUNCPTR(glTranslatef)
+MAKE_FUNCPTR(glVertex3f)
+MAKE_FUNCPTR(glVertex3fv)
+MAKE_FUNCPTR(glVertex4f)
+MAKE_FUNCPTR(glXCreateContext)
+MAKE_FUNCPTR(glXDestroyContext)
+MAKE_FUNCPTR(glXMakeCurrent)
+MAKE_FUNCPTR(glXSwapBuffers)
+#undef MAKE_FUNCPTR
+
+#ifndef GLPRIVATE_NO_REDEFINE
+
+#define glAlphaFunc pglAlphaFunc
+#define glBegin pglBegin
+#define glBindTexture pglBindTexture
+#define glBlendFunc pglBlendFunc
+#define glClear pglClear
+#define glClearColor pglClearColor
+#define glClearDepth pglClearDepth
+#define glClearStencil pglClearStencil
+#define glClipPlane pglClipPlane
+#define glColor3f pglColor3f
+#define glColor3ub pglColor3ub
+#define glColor4ub pglColor4ub
+#define glColorMaterial pglColorMaterial
+#define glCullFace pglCullFace
+#define glDeleteTextures pglDeleteTextures
+#define glDepthFunc pglDepthFunc
+#define glDepthMask pglDepthMask
+#define glDisable pglDisable
+#define glDrawBuffer pglDrawBuffer
+#define glDrawPixels pglDrawPixels
+#define glEnable pglEnable
+#define glEnd pglEnd
+#define glFlush pglFlush
+#define glFogf pglFogf
+#define glFogfv pglFogfv
+#define glFogi pglFogi
+#define glFrontFace pglFrontFace
+#define glGenTextures pglGenTextures
+#define glGetBooleanv pglGetBooleanv
+#define glGetFloatv pglGetFloatv
+#define glGetIntegerv pglGetIntegerv
+#define glHint pglHint
+#define glLightModelfv pglLightModelfv
+#define glLightModeli pglLightModeli
+#define glLightfv pglLightfv
+#define glLoadIdentity pglLoadIdentity
+#define glLoadMatrixf pglLoadMatrixf
+#define glMaterialf pglMaterialf
+#define glMaterialfv pglMaterialfv
+#define glMatrixMode pglMatrixMode
+#define glMultMatrixf pglMultMatrixf
+#define glNormal3f pglNormal3f
+#define glNormal3fv pglNormal3fv
+#define glPolygonMode pglPolygonMode
+#define glPolygonOffset pglPolygonOffset
+#define glPopMatrix pglPopMatrix
+#define glPushMatrix pglPushMatrix
+#define glRasterPos2f pglRasterPos2f
+#define glReadBuffer pglReadBuffer
+#define glReadPixels pglReadPixels
+#define glShadeModel pglShadeModel
+#define glStencilFunc pglStencilFunc
+#define glStencilMask pglStencilMask
+#define glStencilOp pglStencilOp
+#define glTexCoord2f pglTexCoord2f
+#define glTexCoord2fv pglTexCoord2fv
+#define glTexEnvi pglTexEnvi
+#define glTexImage2D pglTexImage2D
+#define glTexParameteri pglTexParameteri
+#define glTexParameterfv pglTexParameterfv
+#define glTexSubImage2D pglTexSubImage2D
+#define glTranslatef pglTranslatef
+#define glVertex3f pglVertex3f
+#define glVertex3fv pglVertex3fv
+#define glVertex4f pglVertex4f
+#define glXCreateContext pglXCreateContext
+#define glXDestroyContext pglXDestroyContext
+#define glXMakeCurrent pglXMakeCurrent
+#define glXSwapBuffers pglXSwapBuffers
+
+#endif /* GLPRIVATE_NO_REDEFINE */
+
+#endif /* HAVE_OPENGL */
+
+#endif /* __GRAPHICS_WINE_GL_PRIVATE_H */
+
More information about the wine-devel
mailing list