From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/opengl.c | 10 +++++++--- dlls/wineandroid.drv/opengl.c | 9 +-------- dlls/winewayland.drv/opengl.c | 9 +-------- 3 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 781b9df159d..65318895a65 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -575,10 +575,14 @@ static BOOL egldrv_context_destroy( void *context ) return TRUE; }
-static BOOL egldrv_make_current( struct opengl_drawable *draw_base, struct opengl_drawable *read_base, void *private ) +static BOOL egldrv_make_current( struct opengl_drawable *draw, struct opengl_drawable *read, void *context ) { - FIXME( "stub!\n" ); - return FALSE; + const struct opengl_funcs *funcs = &display_funcs; + const struct egl_platform *egl = &display_egl; + + TRACE( "draw %s, read %s, context %p\n", debugstr_opengl_drawable( draw ), debugstr_opengl_drawable( read ), context ); + + return funcs->p_eglMakeCurrent( egl->display, context ? draw->surface : EGL_NO_SURFACE, context ? read->surface : EGL_NO_SURFACE, context ); }
static const struct opengl_driver_funcs egldrv_funcs = diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index 6d4e67fb4e0..ba72dbd4979 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -146,13 +146,6 @@ static BOOL android_surface_create( HWND hwnd, HDC hdc, int format, struct openg return TRUE; }
-static BOOL android_make_current( struct opengl_drawable *draw_base, struct opengl_drawable *read_base, void *context ) -{ - struct gl_drawable *draw = impl_from_opengl_drawable( draw_base ), *read = impl_from_opengl_drawable( read_base ); - TRACE( "draw %s, read %s, context %p\n", debugstr_opengl_drawable( draw_base ), debugstr_opengl_drawable( read_base ), context ); - return funcs->p_eglMakeCurrent( egl->display, context ? draw->base.surface : EGL_NO_SURFACE, context ? read->base.surface : EGL_NO_SURFACE, context ); -} - static EGLenum android_init_egl_platform( const struct egl_platform *platform, EGLNativeDisplayType *platform_display ) { egl = platform; @@ -197,7 +190,6 @@ static struct opengl_driver_funcs android_driver_funcs = .p_get_proc_address = android_get_proc_address, .p_init_wgl_extensions = android_init_wgl_extensions, .p_surface_create = android_surface_create, - .p_make_current = android_make_current, };
static const struct opengl_drawable_funcs android_drawable_funcs = @@ -231,6 +223,7 @@ UINT ANDROID_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, android_driver_funcs.p_describe_pixel_format = (*driver_funcs)->p_describe_pixel_format; android_driver_funcs.p_context_create = (*driver_funcs)->p_context_create; android_driver_funcs.p_context_destroy = (*driver_funcs)->p_context_destroy; + android_driver_funcs.p_make_current = (*driver_funcs)->p_make_current;
*driver_funcs = &android_driver_funcs; return STATUS_SUCCESS; diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index bd84ea43932..9f1660a80a6 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -161,13 +161,6 @@ static void wayland_gl_drawable_sync_size(struct wayland_gl_drawable *gl) wl_egl_window_resize(gl->wl_egl_window, client_width, client_height, 0, 0); }
-static BOOL wayland_make_current(struct opengl_drawable *draw_base, struct opengl_drawable *read_base, void *context) -{ - struct wayland_gl_drawable *draw = impl_from_opengl_drawable(draw_base), *read = impl_from_opengl_drawable(read_base); - TRACE("draw %s, read %s, context %p\n", debugstr_opengl_drawable(draw_base), debugstr_opengl_drawable(read_base), context); - return funcs->p_eglMakeCurrent(egl->display, context ? draw->base.surface : EGL_NO_SURFACE, context ? read->base.surface : EGL_NO_SURFACE, context); -} - static BOOL wayland_opengl_surface_create(HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable) { struct opengl_drawable *previous; @@ -249,7 +242,6 @@ static struct opengl_driver_funcs wayland_driver_funcs = { .p_init_egl_platform = wayland_init_egl_platform, .p_surface_create = wayland_opengl_surface_create, - .p_make_current = wayland_make_current, .p_pbuffer_create = wayland_pbuffer_create, .p_pbuffer_updated = wayland_pbuffer_updated, .p_pbuffer_bind = wayland_pbuffer_bind, @@ -285,6 +277,7 @@ UINT WAYLAND_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, c wayland_driver_funcs.p_init_wgl_extensions = (*driver_funcs)->p_init_wgl_extensions; wayland_driver_funcs.p_context_create = (*driver_funcs)->p_context_create; wayland_driver_funcs.p_context_destroy = (*driver_funcs)->p_context_destroy; + wayland_driver_funcs.p_make_current = (*driver_funcs)->p_make_current;
*driver_funcs = &wayland_driver_funcs; return STATUS_SUCCESS;