2022-04-25 20:50:30 -07:00
|
|
|
From a9cf27a493697c97249ce526483d25c871c053c4 Mon Sep 17 00:00:00 2001
|
2014-06-01 13:55:11 -07:00
|
|
|
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
|
|
|
Date: Sun, 1 Jun 2014 22:51:32 +0200
|
2022-04-25 20:50:30 -07:00
|
|
|
Subject: [PATCH] winex11.drv: Indicate direct rendering through OpenGL
|
|
|
|
extension
|
2014-06-01 13:55:11 -07:00
|
|
|
|
|
|
|
---
|
2022-04-25 20:50:30 -07:00
|
|
|
dlls/winex11.drv/opengl.c | 7 +++++--
|
|
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
2014-06-01 13:55:11 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
|
2022-04-25 20:50:30 -07:00
|
|
|
index 92555841f71..71e7ecbcf7c 100644
|
2014-06-01 13:55:11 -07:00
|
|
|
--- a/dlls/winex11.drv/opengl.c
|
|
|
|
+++ b/dlls/winex11.drv/opengl.c
|
2022-04-25 20:50:30 -07:00
|
|
|
@@ -410,6 +410,7 @@ static int GLXErrorHandler(Display *dpy, XErrorEvent *event, void *arg)
|
2014-06-01 13:55:11 -07:00
|
|
|
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
|
|
|
{
|
|
|
|
static const char legacy_extensions[] = " WGL_EXT_extensions_string WGL_EXT_swap_control";
|
|
|
|
+ static const char direct_extension[] = " WINE_EXT_direct_rendering";
|
|
|
|
|
|
|
|
int screen = DefaultScreen(gdi_display);
|
|
|
|
Window win = 0, root = 0;
|
2022-04-25 20:50:30 -07:00
|
|
|
@@ -465,16 +466,18 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
|
2014-06-01 13:55:11 -07:00
|
|
|
}
|
|
|
|
gl_renderer = (const char *)opengl_funcs.gl.p_glGetString(GL_RENDERER);
|
2018-02-18 13:53:50 -08:00
|
|
|
gl_version = (const char *)opengl_funcs.gl.p_glGetString(GL_VERSION);
|
|
|
|
+ glx_direct = pglXIsDirect(gdi_display, ctx);
|
2014-06-01 13:55:11 -07:00
|
|
|
str = (const char *) opengl_funcs.gl.p_glGetString(GL_EXTENSIONS);
|
2022-04-25 20:50:30 -07:00
|
|
|
- glExtensions = malloc( strlen(str) + sizeof(legacy_extensions) );
|
|
|
|
+ glExtensions = malloc( strlen(str)+sizeof(legacy_extensions)+sizeof(direct_extension) );
|
2018-02-18 13:53:50 -08:00
|
|
|
strcpy(glExtensions, str);
|
|
|
|
strcat(glExtensions, legacy_extensions);
|
|
|
|
+ if (glx_direct)
|
|
|
|
+ strcat(glExtensions, direct_extension);
|
2014-06-01 13:55:11 -07:00
|
|
|
|
|
|
|
/* Get the common GLX version supported by GLX client and server ( major/minor) */
|
2018-02-18 13:53:50 -08:00
|
|
|
pglXQueryVersion(gdi_display, &glxVersion[0], &glxVersion[1]);
|
2014-06-01 13:55:11 -07:00
|
|
|
|
2018-02-18 13:53:50 -08:00
|
|
|
glxExtensions = pglXQueryExtensionsString(gdi_display, screen);
|
|
|
|
- glx_direct = pglXIsDirect(gdi_display, ctx);
|
2014-06-01 13:55:11 -07:00
|
|
|
|
2018-02-18 13:53:50 -08:00
|
|
|
TRACE("GL version : %s.\n", gl_version);
|
2014-06-01 13:55:11 -07:00
|
|
|
TRACE("GL renderer : %s.\n", gl_renderer);
|
|
|
|
--
|
2022-04-25 20:50:30 -07:00
|
|
|
2.35.1
|
|
|
|
|