Support org.lwjgl.opengl.Window.allowSoftwareOpenGL on Mac OS X

This commit is contained in:
Elias Naur 2004-12-11 10:47:21 +00:00
parent 644bbc9ac0
commit bc6cabc1fd
1 changed files with 3 additions and 1 deletions

View File

@ -69,8 +69,10 @@ NSOpenGLContext *createContext(JNIEnv *env, jobject pixel_format, bool double_bu
bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z"));
attrib_list_t attribs;
jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL");
initAttribList(&attribs);
putAttrib(&attribs, NSOpenGLPFAAccelerated);
if (!allow_software_acceleration)
putAttrib(&attribs, NSOpenGLPFAAccelerated);
if (double_buffered)
putAttrib(&attribs, NSOpenGLPFADoubleBuffer);
putAttrib(&attribs, NSOpenGLPFAColorSize); putAttrib(&attribs, bpp);