GDK/Win32: Force GLES if running on ARM64
If GLES support is enabled on Windows, force GLES mode if we are running on a ARM64 version of Windows (i.e. Windows 10 for ARM). This is required as ARM64 versions of Windows only provide a software implementation of OpenGL 1.1/1.2, which is not enough for our purposes. Thus, we could make instead use the GLES support provided via Google's libANGLE (which emulates OpenGL/ES 3 with Direct3D 9/11), so that we can run GtkGLArea programs under OpenGL/ES in ARM64 versions of Windows. Note that eventually we could update the libepoxy build files for Windows to not check nor enable WGL when building for ARM64 Windows, as the WGL items do not work, although they do build.
This commit is contained in:
@ -60,6 +60,13 @@ typedef struct _GdkWin32User32DPIFuncs
|
||||
funcIsProcessDPIAware isDpiAwareFunc;
|
||||
} GdkWin32User32DPIFuncs;
|
||||
|
||||
/* Detect running architecture */
|
||||
typedef BOOL (WINAPI *funcIsWow64Process2) (HANDLE, USHORT *, USHORT *);
|
||||
typedef struct _GdkWin32KernelCPUFuncs
|
||||
{
|
||||
funcIsWow64Process2 isWow64Process2;
|
||||
} GdkWin32KernelCPUFuncs;
|
||||
|
||||
struct _GdkWin32Display
|
||||
{
|
||||
GdkDisplay display;
|
||||
@ -109,6 +116,10 @@ struct _GdkWin32Display
|
||||
|
||||
GdkWin32ShcoreFuncs shcore_funcs;
|
||||
GdkWin32User32DPIFuncs user32_dpi_funcs;
|
||||
|
||||
/* Running CPU items */
|
||||
guint running_on_arm64 : 1;
|
||||
GdkWin32KernelCPUFuncs cpu_funcs;
|
||||
};
|
||||
|
||||
struct _GdkWin32DisplayClass
|
||||
|
||||
Reference in New Issue
Block a user