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

This commit is contained in:
Elias Naur 2006-02-23 19:29:49 +00:00
parent 55d79e7e55
commit d492cbde20
1 changed files with 9 additions and 2 deletions

View File

@ -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;
}