Merge branch 'opengl.win32.fixes' into 'gtk-3-24'
GDK/Win32: Fix up OpenGL a bit (part of !3767 for GTK3) See merge request GNOME/gtk!3792
This commit is contained in:
@ -84,7 +84,6 @@ struct _GdkWin32Display
|
||||
/* WGL/OpenGL Items */
|
||||
guint have_wgl : 1;
|
||||
guint gl_version;
|
||||
HWND gl_hwnd;
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
/* EGL (Angle) Items */
|
||||
|
||||
@ -66,7 +66,7 @@ _gdk_win32_gl_context_dispose (GObject *gobject)
|
||||
wglDeleteContext (context_win32->hglrc);
|
||||
context_win32->hglrc = NULL;
|
||||
|
||||
ReleaseDC (display_win32->gl_hwnd, context_win32->gl_hdc);
|
||||
ReleaseDC (GDK_WINDOW_HWND (window), context_win32->gl_hdc);
|
||||
}
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
@ -84,7 +84,7 @@ _gdk_win32_gl_context_dispose (GObject *gobject)
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
|
||||
ReleaseDC (display_win32->gl_hwnd, context_win32->gl_hdc);
|
||||
ReleaseDC (GDK_WINDOW_HWND (window), context_win32->gl_hdc);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1192,8 +1192,7 @@ _gdk_win32_window_create_gl_context (GdkWindow *window,
|
||||
EGLConfig config;
|
||||
#endif
|
||||
|
||||
display_win32->gl_hwnd = GDK_WINDOW_HWND (window);
|
||||
hdc = GetDC (display_win32->gl_hwnd);
|
||||
hdc = GetDC (GDK_WINDOW_HWND (window));
|
||||
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
/* display_win32->hdc_egl_temp should *not* be destroyed here! It is destroyed at dispose()! */
|
||||
|
||||
@ -6304,8 +6304,8 @@ gdk_win32_window_get_handle (GdkWindow *window)
|
||||
#ifdef GDK_WIN32_ENABLE_EGL
|
||||
EGLSurface
|
||||
_gdk_win32_window_get_egl_surface (GdkWindow *window,
|
||||
EGLConfig config,
|
||||
gboolean is_dummy)
|
||||
EGLConfig config,
|
||||
gboolean is_dummy)
|
||||
{
|
||||
EGLSurface surface;
|
||||
GdkWin32Display *display = GDK_WIN32_DISPLAY (gdk_window_get_display (window));
|
||||
@ -6325,7 +6325,10 @@ _gdk_win32_window_get_egl_surface (GdkWindow *window,
|
||||
else
|
||||
{
|
||||
if (impl->egl_surface == EGL_NO_SURFACE)
|
||||
impl->egl_surface = eglCreateWindowSurface (display->egl_disp, config, display->gl_hwnd, NULL);
|
||||
impl->egl_surface = eglCreateWindowSurface (display->egl_disp,
|
||||
config,
|
||||
GDK_WINDOW_HWND (window),
|
||||
NULL);
|
||||
|
||||
return impl->egl_surface;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user