Commit d1291ba1 authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Better caps support (ie more in line with what GL reports).

parent 70d1136c
......@@ -67,6 +67,8 @@ BOOL opengl_initialized = 0;
#ifdef HAVE_OPENGL
#include "mesa_private.h"
static void *gl_handle = NULL;
#define GL_API_FUNCTION(f) typeof(f) * p##f;
......@@ -80,7 +82,8 @@ static void *gl_handle = NULL;
static BOOL DDRAW_bind_to_opengl( void )
{
char *glname = SONAME_LIBGL;
BOOL ret_value;
gl_handle = wine_dlopen(glname, RTLD_NOW, NULL, 0);
if (!gl_handle) {
WARN("Wine cannot find the OpenGL graphics library (%s).\n",glname);
......@@ -96,8 +99,13 @@ static BOOL DDRAW_bind_to_opengl( void )
#include "gl_api.h"
#undef GL_API_FUNCTION
return TRUE;
/* And now calls the function to initialize the various fields for the rendering devices */
ret_value = d3ddevice_init_at_startup(gl_handle);
wine_dlclose(gl_handle, NULL, 0);
gl_handle = NULL;
return ret_value;
sym_not_found:
WARN("Wine cannot find certain functions that it needs inside the OpenGL\n"
"graphics library. To enable Wine to use OpenGL please upgrade\n"
......
......@@ -169,6 +169,9 @@ extern HRESULT d3ddevice_enumerate(LPD3DENUMDEVICESCALLBACK cb, LPVOID context,
extern HRESULT d3ddevice_enumerate7(LPD3DENUMDEVICESCALLBACK7 cb, LPVOID context) ;
extern HRESULT d3ddevice_find(IDirectDrawImpl *d3d, LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lplpD3DDevice);
/* Used by the DLL init routine to set-up the GL context and stuff properly */
extern BOOL d3ddevice_init_at_startup(void *gl_handle);
/* Used to upload the texture */
extern HRESULT gltex_upload_texture(IDirectDrawSurfaceImpl *This, IDirect3DDeviceImpl *d3ddev, DWORD stage) ;
......
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