forked from AuroraMiddleware/gtk
536fa88cd8
This adds support for OpenGL to the GDK Windows backend using the WGL API calls, which enables programs that uses the GTK+ GLArea widgets to work on Windows as well. This also adds a simple utility function to query for the version of OpenGL that is supported by the Windows system, like the one provided by the X11 backend. Many thanks to Alex (and Emmanuele, who started the OpenGL integration in GTK+) who offered advice and help along the way, as well as the X11 and Wayland backend for this work to refer to and to model upon. https://bugzilla.gnome.org/show_bug.cgi?id=740795
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*
|
|
* gdkdisplay-win32.h
|
|
*
|
|
* Copyright 2014 Chun-wei Fan <fanc999@yahoo.com.tw>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "gdkdisplayprivate.h"
|
|
|
|
#ifndef __GDK_DISPLAY__WIN32_H__
|
|
#define __GDK_DISPLAY__WIN32_H__
|
|
|
|
struct _GdkWin32Display
|
|
{
|
|
GdkDisplay display;
|
|
|
|
/* WGL/OpenGL Items */
|
|
guint have_wgl : 1;
|
|
guint gl_version;
|
|
HDC gl_hdc;
|
|
HWND gl_hwnd;
|
|
|
|
guint hasWglARBCreateContext : 1;
|
|
guint hasWglARBPbuffer : 1;
|
|
guint hasWglARBRenderTexture : 1;
|
|
guint hasWglEXTSwapControl : 1;
|
|
guint hasWglOMLSyncControl : 1;
|
|
};
|
|
|
|
struct _GdkWin32DisplayClass
|
|
{
|
|
GdkDisplayClass display_class;
|
|
};
|
|
|
|
#endif /* __GDK_DISPLAY__WIN32_H__ */
|