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:
parent
55d79e7e55
commit
d492cbde20
|
@ -57,12 +57,19 @@ static bool checkContext(JNIEnv *env, Display *display, GLXContext context) {
|
||||||
throwException(env, "Could not create GLX context");
|
throwException(env, "Could not create GLX context");
|
||||||
return false;
|
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) {
|
if (!allow_software_acceleration && lwjgl_glXIsDirect(display, context) == False) {
|
||||||
lwjgl_glXDestroyContext(display, context);
|
lwjgl_glXDestroyContext(display, context);
|
||||||
throwException(env, "Could not create a direct GLX context");
|
throwException(env, "Could not create a direct GLX context");
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue