From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 2 +- dlls/win32u/opengl.c | 132 +++++++++++++++--------------- dlls/wineandroid.drv/android.h | 2 +- dlls/wineandroid.drv/opengl.c | 6 +- dlls/winemac.drv/macdrv.h | 2 +- dlls/winemac.drv/opengl.c | 5 +- dlls/winewayland.drv/opengl.c | 6 +- dlls/winewayland.drv/waylanddrv.h | 2 +- dlls/winex11.drv/opengl.c | 7 +- dlls/winex11.drv/x11drv.h | 2 +- include/wine/gdi_driver.h | 4 +- 11 files changed, 78 insertions(+), 92 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index 5e32e714b24..cf3be4be949 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -911,7 +911,7 @@ static UINT nulldrv_VulkanInit( UINT version, void *vulkan_handle, const struct return STATUS_NOT_IMPLEMENTED; }
-static UINT nulldrv_OpenGLInit( UINT version, struct opengl_funcs **opengl_funcs, const struct opengl_driver_funcs **driver_funcs ) +static UINT nulldrv_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs ) { return STATUS_NOT_IMPLEMENTED; } diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 4aa6d8ad162..7b3910c5ab4 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -70,9 +70,8 @@ struct wgl_pbuffer };
static const struct opengl_funcs *default_funcs; /* default GL function table from opengl32 */ -static struct opengl_funcs null_memory_funcs, null_display_funcs; -static struct opengl_funcs *display_funcs = &null_display_funcs; -static struct opengl_funcs *memory_funcs = &null_memory_funcs; +static struct opengl_funcs display_funcs; +static struct opengl_funcs memory_funcs;
static PFN_glFinish p_memory_glFinish, p_display_glFinish; static PFN_glFlush p_memory_glFlush, p_display_glFlush; @@ -194,7 +193,6 @@ struct osmesa_context UINT format; };
-static struct opengl_funcs osmesa_opengl_funcs; static const struct opengl_driver_funcs osmesa_driver_funcs;
static OSMesaContext (*pOSMesaCreateContextExt)( GLenum format, GLint depthBits, GLint stencilBits, @@ -206,7 +204,7 @@ static GLboolean (*pOSMesaMakeCurrent)( OSMesaContext ctx, void *buffer, GLenum static void (*pOSMesaPixelStore)( GLint pname, GLint value ); static void describe_pixel_format( int fmt, PIXELFORMATDESCRIPTOR *descr );
-static struct opengl_funcs *osmesa_get_wgl_driver( const struct opengl_driver_funcs **driver_funcs ) +static BOOL osmesa_get_wgl_driver( const struct opengl_driver_funcs **driver_funcs ) { static void *osmesa_handle;
@@ -214,7 +212,7 @@ static struct opengl_funcs *osmesa_get_wgl_driver( const struct opengl_driver_fu if (osmesa_handle == NULL) { ERR( "Failed to load OSMesa: %s\n", dlerror() ); - return NULL; + return FALSE; }
#define LOAD_FUNCPTR(f) do if (!(p##f = dlsym( osmesa_handle, #f ))) \ @@ -231,12 +229,12 @@ static struct opengl_funcs *osmesa_get_wgl_driver( const struct opengl_driver_fu #undef LOAD_FUNCPTR
*driver_funcs = &osmesa_driver_funcs; - return &osmesa_opengl_funcs; + return TRUE;
failed: dlclose( osmesa_handle ); osmesa_handle = NULL; - return NULL; + return FALSE; }
static const char *osmesa_init_wgl_extensions( struct opengl_funcs *funcs ) @@ -409,9 +407,9 @@ static const struct opengl_driver_funcs osmesa_driver_funcs =
#else /* SONAME_LIBOSMESA */
-static struct opengl_funcs *osmesa_get_wgl_driver( const struct opengl_driver_funcs **driver_funcs ) +static BOOL osmesa_get_wgl_driver( const struct opengl_driver_funcs **driver_funcs ) { - return NULL; + return FALSE; }
#endif /* SONAME_LIBOSMESA */ @@ -671,14 +669,14 @@ static struct wgl_context *context_create( HDC hdc, struct wgl_context *shared, }
if (!(funcs = get_dc_funcs( hdc, NULL ))) return NULL; - driver_funcs = funcs == display_funcs ? display_driver_funcs : memory_driver_funcs; + driver_funcs = funcs == &display_funcs ? display_driver_funcs : memory_driver_funcs;
if (!(context = calloc( 1, sizeof(*context) ))) return NULL; context->driver_funcs = driver_funcs; context->funcs = funcs; context->pixel_format = format; - context->p_glFinish = funcs == display_funcs ? p_display_glFinish : p_memory_glFinish; - context->p_glFlush = funcs == display_funcs ? p_display_glFlush : p_memory_glFlush; + context->p_glFinish = funcs == &display_funcs ? p_display_glFinish : p_memory_glFinish; + context->p_glFlush = funcs == &display_funcs ? p_display_glFlush : p_memory_glFlush;
if (!driver_funcs->p_context_create( hdc, format, shared_private, attribs, &context->driver_private )) { @@ -809,7 +807,7 @@ static struct wgl_pbuffer *win32u_wglCreatePbufferARB( HDC hdc, int format, int return NULL; } NtGdiSetPixelFormat( pbuffer->hdc, format ); - pbuffer->driver_funcs = funcs == display_funcs ? display_driver_funcs : memory_driver_funcs; + pbuffer->driver_funcs = funcs == &display_funcs ? display_driver_funcs : memory_driver_funcs; pbuffer->funcs = funcs; pbuffer->width = width; pbuffer->height = height; @@ -1237,7 +1235,7 @@ static BOOL win32u_wglSwapBuffers( HDC hdc ) RtlSetLastWin32Error( ERROR_DC_NOT_FOUND ); return FALSE; } - driver_funcs = funcs == display_funcs ? display_driver_funcs : memory_driver_funcs; + driver_funcs = funcs == &display_funcs ? display_driver_funcs : memory_driver_funcs;
if (!(hwnd = NtUserWindowFromDC( hdc ))) interval = 0; else interval = get_window_swap_interval( hwnd ); @@ -1327,25 +1325,25 @@ static void memory_funcs_init(void) if (!osmesa_get_wgl_driver( &memory_driver_funcs )) WARN( "Failed to initialize OSMesa functions\n" );
memory_formats_count = memory_driver_funcs->p_init_pixel_formats( &memory_onscreen_count ); - init_opengl_funcs( memory_funcs, memory_driver_funcs ); + init_opengl_funcs( &memory_funcs, memory_driver_funcs );
- memory_funcs->p_wglGetProcAddress = win32u_memory_wglGetProcAddress; - memory_funcs->p_get_pixel_formats = win32u_memory_get_pixel_formats; + memory_funcs.p_wglGetProcAddress = win32u_memory_wglGetProcAddress; + memory_funcs.p_get_pixel_formats = win32u_memory_get_pixel_formats;
- memory_funcs->p_wglGetPixelFormat = win32u_wglGetPixelFormat; - memory_funcs->p_wglSetPixelFormat = win32u_wglSetPixelFormat; + memory_funcs.p_wglGetPixelFormat = win32u_wglGetPixelFormat; + memory_funcs.p_wglSetPixelFormat = win32u_wglSetPixelFormat;
- memory_funcs->p_wglCreateContext = win32u_wglCreateContext; - memory_funcs->p_wglDeleteContext = win32u_wglDeleteContext; - memory_funcs->p_wglCopyContext = win32u_wglCopyContext; - memory_funcs->p_wglShareLists = win32u_wglShareLists; - memory_funcs->p_wglMakeCurrent = win32u_wglMakeCurrent; + memory_funcs.p_wglCreateContext = win32u_wglCreateContext; + memory_funcs.p_wglDeleteContext = win32u_wglDeleteContext; + memory_funcs.p_wglCopyContext = win32u_wglCopyContext; + memory_funcs.p_wglShareLists = win32u_wglShareLists; + memory_funcs.p_wglMakeCurrent = win32u_wglMakeCurrent;
- memory_funcs->p_wglSwapBuffers = win32u_wglSwapBuffers; - p_memory_glFinish = memory_funcs->p_glFinish; - memory_funcs->p_glFinish = win32u_glFinish; - p_memory_glFlush = memory_funcs->p_glFlush; - memory_funcs->p_glFlush = win32u_glFlush; + memory_funcs.p_wglSwapBuffers = win32u_wglSwapBuffers; + p_memory_glFinish = memory_funcs.p_glFinish; + memory_funcs.p_glFinish = win32u_glFinish; + p_memory_glFlush = memory_funcs.p_glFlush; + memory_funcs.p_glFlush = win32u_glFlush; }
static void display_funcs_init(void) @@ -1356,69 +1354,69 @@ static void display_funcs_init(void) WARN( "Failed to initialize the driver OpenGL functions, status %#x\n", status );
display_formats_count = display_driver_funcs->p_init_pixel_formats( &display_onscreen_count ); - init_opengl_funcs( display_funcs, display_driver_funcs ); + init_opengl_funcs( &display_funcs, display_driver_funcs );
- display_funcs->p_wglGetProcAddress = win32u_display_wglGetProcAddress; - display_funcs->p_get_pixel_formats = win32u_display_get_pixel_formats; + display_funcs.p_wglGetProcAddress = win32u_display_wglGetProcAddress; + display_funcs.p_get_pixel_formats = win32u_display_get_pixel_formats;
- strcpy( wgl_extensions, display_driver_funcs->p_init_wgl_extensions( display_funcs ) ); - display_funcs->p_wglGetPixelFormat = win32u_wglGetPixelFormat; - display_funcs->p_wglSetPixelFormat = win32u_wglSetPixelFormat; + strcpy( wgl_extensions, display_driver_funcs->p_init_wgl_extensions( &display_funcs ) ); + display_funcs.p_wglGetPixelFormat = win32u_wglGetPixelFormat; + display_funcs.p_wglSetPixelFormat = win32u_wglSetPixelFormat;
- display_funcs->p_wglCreateContext = win32u_wglCreateContext; - display_funcs->p_wglDeleteContext = win32u_wglDeleteContext; - display_funcs->p_wglCopyContext = win32u_wglCopyContext; - display_funcs->p_wglShareLists = win32u_wglShareLists; - display_funcs->p_wglMakeCurrent = win32u_wglMakeCurrent; + display_funcs.p_wglCreateContext = win32u_wglCreateContext; + display_funcs.p_wglDeleteContext = win32u_wglDeleteContext; + display_funcs.p_wglCopyContext = win32u_wglCopyContext; + display_funcs.p_wglShareLists = win32u_wglShareLists; + display_funcs.p_wglMakeCurrent = win32u_wglMakeCurrent;
- display_funcs->p_wglSwapBuffers = win32u_wglSwapBuffers; - p_display_glFinish = display_funcs->p_glFinish; - display_funcs->p_glFinish = win32u_glFinish; - p_display_glFlush = display_funcs->p_glFlush; - display_funcs->p_glFlush = win32u_glFlush; + display_funcs.p_wglSwapBuffers = win32u_wglSwapBuffers; + p_display_glFinish = display_funcs.p_glFinish; + display_funcs.p_glFinish = win32u_glFinish; + p_display_glFlush = display_funcs.p_glFlush; + display_funcs.p_glFlush = win32u_glFlush;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_extensions_string" ); - display_funcs->p_wglGetExtensionsStringARB = win32u_wglGetExtensionsStringARB; + display_funcs.p_wglGetExtensionsStringARB = win32u_wglGetExtensionsStringARB;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_EXT_extensions_string" ); - display_funcs->p_wglGetExtensionsStringEXT = win32u_wglGetExtensionsStringEXT; + display_funcs.p_wglGetExtensionsStringEXT = win32u_wglGetExtensionsStringEXT;
/* In WineD3D we need the ability to set the pixel format more than once (e.g. after a device reset). * The default wglSetPixelFormat doesn't allow this, so add our own which allows it. */ register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_WINE_pixel_format_passthrough" ); - display_funcs->p_wglSetPixelFormatWINE = win32u_wglSetPixelFormatWINE; + display_funcs.p_wglSetPixelFormatWINE = win32u_wglSetPixelFormatWINE;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pixel_format" ); - display_funcs->p_wglChoosePixelFormatARB = (void *)1; /* never called */ - display_funcs->p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ - display_funcs->p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */ + display_funcs.p_wglChoosePixelFormatARB = (void *)1; /* never called */ + display_funcs.p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ + display_funcs.p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_create_context" ); register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_create_context_no_error" ); register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_create_context_profile" ); - display_funcs->p_wglCreateContextAttribsARB = win32u_wglCreateContextAttribsARB; + display_funcs.p_wglCreateContextAttribsARB = win32u_wglCreateContextAttribsARB;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_make_current_read" ); - display_funcs->p_wglGetCurrentReadDCARB = (void *)1; /* never called */ - display_funcs->p_wglMakeContextCurrentARB = win32u_wglMakeContextCurrentARB; + display_funcs.p_wglGetCurrentReadDCARB = (void *)1; /* never called */ + display_funcs.p_wglMakeContextCurrentARB = win32u_wglMakeContextCurrentARB;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pbuffer" ); - display_funcs->p_wglCreatePbufferARB = win32u_wglCreatePbufferARB; - display_funcs->p_wglDestroyPbufferARB = win32u_wglDestroyPbufferARB; - display_funcs->p_wglGetPbufferDCARB = win32u_wglGetPbufferDCARB; - display_funcs->p_wglReleasePbufferDCARB = win32u_wglReleasePbufferDCARB; - display_funcs->p_wglQueryPbufferARB = win32u_wglQueryPbufferARB; + display_funcs.p_wglCreatePbufferARB = win32u_wglCreatePbufferARB; + display_funcs.p_wglDestroyPbufferARB = win32u_wglDestroyPbufferARB; + display_funcs.p_wglGetPbufferDCARB = win32u_wglGetPbufferDCARB; + display_funcs.p_wglReleasePbufferDCARB = win32u_wglReleasePbufferDCARB; + display_funcs.p_wglQueryPbufferARB = win32u_wglQueryPbufferARB;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_render_texture" ); - display_funcs->p_wglBindTexImageARB = win32u_wglBindTexImageARB; - display_funcs->p_wglReleaseTexImageARB = win32u_wglReleaseTexImageARB; - display_funcs->p_wglSetPbufferAttribARB = win32u_wglSetPbufferAttribARB; + display_funcs.p_wglBindTexImageARB = win32u_wglBindTexImageARB; + display_funcs.p_wglReleaseTexImageARB = win32u_wglReleaseTexImageARB; + display_funcs.p_wglSetPbufferAttribARB = win32u_wglSetPbufferAttribARB;
register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_EXT_swap_control" ); register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_EXT_swap_control_tear" ); - display_funcs->p_wglSwapIntervalEXT = win32u_wglSwapIntervalEXT; - display_funcs->p_wglGetSwapIntervalEXT = win32u_wglGetSwapIntervalEXT; + display_funcs.p_wglSwapIntervalEXT = win32u_wglSwapIntervalEXT; + display_funcs.p_wglGetSwapIntervalEXT = win32u_wglGetSwapIntervalEXT; }
static const struct opengl_funcs *get_dc_funcs( HDC hdc, const struct opengl_funcs *null_funcs ) @@ -1437,13 +1435,13 @@ static const struct opengl_funcs *get_dc_funcs( HDC hdc, const struct opengl_fun { static pthread_once_t display_init_once = PTHREAD_ONCE_INIT; pthread_once( &display_init_once, display_funcs_init ); - return display_funcs; + return &display_funcs; } if (is_memdc) { static pthread_once_t memory_init_once = PTHREAD_ONCE_INIT; pthread_once( &memory_init_once, memory_funcs_init ); - return memory_funcs; + return &memory_funcs; } return NULL; } diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h index d744202e6c9..291d2f0d299 100644 --- a/dlls/wineandroid.drv/android.h +++ b/dlls/wineandroid.drv/android.h @@ -56,7 +56,7 @@ DECL_FUNCPTR( ANativeWindow_release ); extern pthread_mutex_t drawable_mutex; extern void update_gl_drawable( HWND hwnd ); extern void destroy_gl_drawable( HWND hwnd ); -extern UINT ANDROID_OpenGLInit( UINT version, struct opengl_funcs **opengl_funcs, const struct opengl_driver_funcs **driver_funcs ); +extern UINT ANDROID_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs );
/************************************************************************** diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index d65d4f2d565..aacb0c6a1fc 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -100,7 +100,6 @@ static struct egl_pixel_format *pixel_formats; static int nb_pixel_formats, nb_onscreen_formats; static EGLDisplay display; static char wgl_extensions[4096]; -static struct opengl_funcs egl_funcs;
static struct list gl_contexts = LIST_INIT( gl_contexts ); static struct list gl_drawables = LIST_INIT( gl_drawables ); @@ -514,7 +513,7 @@ static const struct opengl_driver_funcs android_driver_funcs = /********************************************************************** * ANDROID_OpenGLInit */ -UINT ANDROID_OpenGLInit( UINT version, struct opengl_funcs **funcs, const struct opengl_driver_funcs **driver_funcs ) +UINT ANDROID_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs ) { EGLint major, minor;
@@ -557,9 +556,6 @@ UINT ANDROID_OpenGLInit( UINT version, struct opengl_funcs **funcs, const struct if (!p_eglInitialize( display, &major, &minor )) return 0; TRACE( "display %p version %u.%u\n", display, major, minor );
- *funcs = &egl_funcs; *driver_funcs = &android_driver_funcs; return STATUS_SUCCESS; } - -static struct opengl_funcs egl_funcs; diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 2e2de456ddf..715997eb482 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -240,7 +240,7 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p extern BOOL query_pasteboard_data(HWND hwnd, CFStringRef type); extern void macdrv_lost_pasteboard_ownership(HWND hwnd);
-extern UINT macdrv_OpenGLInit(UINT version, struct opengl_funcs **opengl_funcs, const struct opengl_driver_funcs **driver_funcs); +extern UINT macdrv_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs); extern UINT macdrv_VulkanInit(UINT version, void *vulkan_handle, const struct vulkan_driver_funcs **driver_funcs); extern void sync_gl_view(struct macdrv_win_data* data, const struct window_rects *old_rects);
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index c5ad5e18a09..2715a0708d4 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -88,8 +88,6 @@ static pthread_mutex_t context_mutex = PTHREAD_MUTEX_INITIALIZER; static CFMutableDictionaryRef dc_pbuffers; static pthread_mutex_t dc_pbuffers_mutex = PTHREAD_MUTEX_INITIALIZER;
- -static struct opengl_funcs opengl_funcs; static const struct opengl_driver_funcs macdrv_driver_funcs;
static void (*pglCopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, @@ -2778,7 +2776,7 @@ static const char *macdrv_init_wgl_extensions(struct opengl_funcs *funcs) /********************************************************************** * macdrv_OpenGLInit */ -UINT macdrv_OpenGLInit(UINT version, struct opengl_funcs **funcs, const struct opengl_driver_funcs **driver_funcs) +UINT macdrv_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs) { TRACE("()\n");
@@ -2823,7 +2821,6 @@ UINT macdrv_OpenGLInit(UINT version, struct opengl_funcs **funcs, const struct o LOAD_FUNCPTR(glFlushRenderAPPLE); #undef LOAD_FUNCPTR
- *funcs = &opengl_funcs; *driver_funcs = &macdrv_driver_funcs; return STATUS_SUCCESS;
diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index 3285af9a505..ef1fb49368b 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -51,7 +51,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(waylanddrv); #endif
static void *egl_handle; -static struct opengl_funcs opengl_funcs; static EGLDisplay egl_display; static char wgl_extensions[4096]; static EGLConfig *egl_configs; @@ -900,7 +899,7 @@ static const struct opengl_driver_funcs wayland_driver_funcs = /********************************************************************** * WAYLAND_OpenGLInit */ -UINT WAYLAND_OpenGLInit(UINT version, struct opengl_funcs **funcs, const struct opengl_driver_funcs **driver_funcs) +UINT WAYLAND_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs) { EGLint egl_version[2]; const char *egl_client_exts, *egl_exts; @@ -990,7 +989,6 @@ UINT WAYLAND_OpenGLInit(UINT version, struct opengl_funcs **funcs, const struct has_egl_ext_pixel_format_float = has_extension(egl_exts, "EGL_EXT_pixel_format_float");
if (!init_opengl_funcs()) goto err; - *funcs = &opengl_funcs; *driver_funcs = &wayland_driver_funcs; return STATUS_SUCCESS;
@@ -1024,7 +1022,7 @@ void wayland_resize_gl_drawable(HWND hwnd)
#else /* No GL */
-UINT WAYLAND_OpenGLInit(UINT version, struct opengl_funcs **funcs, const struct opengl_driver_funcs **driver_funcs) +UINT WAYLAND_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs) { return STATUS_NOT_IMPLEMENTED; } diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 7ed3f75e3f3..251a23a4032 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -456,6 +456,6 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, HWND owner_hint, UIN BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, BOOL shaped, const struct window_rects *rects); BOOL WAYLAND_CreateWindowSurface(HWND hwnd, BOOL layered, const RECT *surface_rect, struct window_surface **surface); UINT WAYLAND_VulkanInit(UINT version, void *vulkan_handle, const struct vulkan_driver_funcs **driver_funcs); -UINT WAYLAND_OpenGLInit(UINT version, struct opengl_funcs **opengl_funcs, const struct opengl_driver_funcs **driver_funcs); +UINT WAYLAND_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs);
#endif /* __WINE_WAYLANDDRV_H */ diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index d6f18867f7a..6e1b914b55f 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -261,8 +261,6 @@ static pthread_mutex_t context_mutex = PTHREAD_MUTEX_INITIALIZER;
static const BOOL is_win64 = sizeof(void *) > sizeof(int);
-static struct opengl_funcs opengl_funcs; - static BOOL glxRequireVersion(int requiredVersion);
static void dump_PIXELFORMATDESCRIPTOR(const PIXELFORMATDESCRIPTOR *ppfd) { @@ -502,7 +500,7 @@ static const struct opengl_driver_funcs x11drv_driver_funcs; /********************************************************************** * X11DRV_OpenglInit */ -UINT X11DRV_OpenGLInit( UINT version, struct opengl_funcs **funcs, const struct opengl_driver_funcs **driver_funcs ) +UINT X11DRV_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs ) { int error_base, event_base;
@@ -680,7 +678,6 @@ UINT X11DRV_OpenGLInit( UINT version, struct opengl_funcs **funcs, const struct pglXSwapBuffersMscOML = pglXGetProcAddressARB( (const GLubyte *)"glXSwapBuffersMscOML" ); }
- *funcs = &opengl_funcs; *driver_funcs = &x11drv_driver_funcs; return STATUS_SUCCESS;
@@ -2099,7 +2096,7 @@ static const struct opengl_driver_funcs x11drv_driver_funcs = /********************************************************************** * X11DRV_OpenglInit */ -UINT X11DRV_OpenGLInit( UINT version, struct opengl_funcs **funcs, const struct opengl_driver_funcs **driver_funcs ) +UINT X11DRV_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs ) { return STATUS_NOT_IMPLEMENTED; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index eed34cf1cae..4cd2c7fa48f 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -282,7 +282,7 @@ extern BOOL client_side_with_render; extern BOOL shape_layered_windows; extern const struct gdi_dc_funcs *X11DRV_XRender_Init(void);
-extern UINT X11DRV_OpenGLInit( UINT, struct opengl_funcs **, const struct opengl_driver_funcs ** ); +extern UINT X11DRV_OpenGLInit( UINT, const struct opengl_funcs *, const struct opengl_driver_funcs ** ); extern UINT X11DRV_VulkanInit( UINT, void *, const struct vulkan_driver_funcs ** );
extern struct format_entry *import_xdnd_selection( Display *display, Window win, Atom selection, diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 560e75ca591..51e9efd20d9 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -219,7 +219,7 @@ struct gdi_dc_funcs };
/* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 104 +#define WINE_GDI_DRIVER_VERSION 105
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ @@ -395,7 +395,7 @@ struct user_driver_funcs /* vulkan support */ UINT (*pVulkanInit)(UINT,void *,const struct vulkan_driver_funcs **); /* opengl support */ - UINT (*pOpenGLInit)(UINT,struct opengl_funcs **,const struct opengl_driver_funcs **); + UINT (*pOpenGLInit)(UINT,const struct opengl_funcs *,const struct opengl_driver_funcs **); /* thread management */ void (*pThreadDetach)(void); };