added missing software flag checks in linux

This commit is contained in:
Elias Naur 2004-03-29 11:26:26 +00:00
parent 27633adfcb
commit e5e492a285
2 changed files with 4 additions and 2 deletions

View File

@ -131,7 +131,8 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate
throwException(env, "Could not create a GLX context");
return false;
}
if (glXIsDirect(getCurrentDisplay(), context) == False) {
jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL");
if (!allow_software_acceleration && glXIsDirect(getCurrentDisplay(), context) == False) {
glXDestroyContext(getCurrentDisplay(), context);
XFree(configs);
throwException(env, "Could not create a direct GLX context");

View File

@ -441,7 +441,8 @@ static bool initWindowGLX(JNIEnv *env, Display *disp, int screen, jstring title,
throwException(env, "Could not create a GLX context");
return false;
}
if (glXIsDirect(disp, context) == False) {
jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL");
if (!allow_software_acceleration && glXIsDirect(disp, context) == False) {
glXDestroyContext(disp, context);
XFree(vis_info);
throwException(env, "Could not create a direct GLX context");