From d492cbde2010289a10454d82fec562de6c9e14ae Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 23 Feb 2006 19:29:49 +0000 Subject: [PATCH] Linux: Removed the glXIsDirect test to determine whether a context is accelerated or not. This is specifically not the case for Xgl and friends that accelerates indireect rendering. Unfortunately, I'm not sure what to replace the test with, so there is currently no way to know from LWJGL whether we're software rendered or not (other than measuring FPS). In fact, I'm not even sure that we can come up with a good test, because some (DRI) drivers use software MESA rendering for some parts of GL, while other parts are hardware accelerated --- .../org_lwjgl_opengl_LinuxContextImplementation.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c b/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c index c0c1d74d..d3e6f4c1 100644 --- a/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c +++ b/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c @@ -57,12 +57,19 @@ static bool checkContext(JNIEnv *env, Display *display, GLXContext context) { throwException(env, "Could not create GLX context"); return false; } - jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL"); + /* + * Ditched the requirement that contexts have to be direct. It was + * never true that all accelerated contexts are direct, but it + * was a reasonable test until the appearance of Xgl and friends. + * Now the test is at best useless, and at worst wrong, + * in case the current X server accelerates indirect rendering. + */ +/* jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL"); if (!allow_software_acceleration && lwjgl_glXIsDirect(display, context) == False) { lwjgl_glXDestroyContext(display, context); throwException(env, "Could not create a direct GLX context"); return false; - } + }*/ return true; }