Mac OS X implementation of floating point pixel formats

This commit is contained in:
Elias Naur 2006-06-12 13:33:07 +00:00
parent 9c4ce2845b
commit 7ebfbf8bfe
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,7 @@ NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool u
int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I"));
int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I"));
bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z"));
bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z"));
attrib_list_t attribs;
jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL");
@ -126,6 +127,8 @@ NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool u
putAttrib(&attribs, NSOpenGLPFAPixelBuffer);
if (stereo)
putAttrib(&attribs, NSOpenGLPFAStereo);
if (floating_point)
putAttrib(&attribs, NSOpenGLPFAColorFloat);
putAttrib(&attribs, 0);
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:(NSOpenGLPixelFormatAttribute *)attribs.attribs];