Multithreaded OpenGL now at least compiles without errors even on older Xcode versions.
parent
590c4e9ea8
commit
231e04d69b
|
@ -9,9 +9,7 @@
|
|||
#import "CelestiaAppCore.h"
|
||||
#import <OpenGL/gl.h>
|
||||
#import <OpenGL/glext.h>
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||
#import <OpenGL/CGLTypes.h>
|
||||
#endif
|
||||
|
||||
#ifndef ATI_FSAA_LEVEL
|
||||
#define ATI_FSAA_LEVEL 510
|
||||
|
@ -49,8 +47,7 @@
|
|||
[self setPixelFormat: pixFmt] ;
|
||||
[pixFmt release];
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||
if (kCGLNoError == CGLEnable([[self openGLContext] CGLContextObj], kCGLCEMPEngine))
|
||||
if (0 == CGLEnable([[self openGLContext] CGLContextObj], 313))
|
||||
{
|
||||
NSLog(@"Multithreaded OpenGL enabled.");
|
||||
}
|
||||
|
@ -58,7 +55,7 @@
|
|||
{
|
||||
NSLog(@"Multithreaded OpenGL not supported on your system.");
|
||||
}
|
||||
#endif
|
||||
|
||||
swapInterval = 1 ;
|
||||
|
||||
[[self openGLContext]
|
||||
|
@ -116,16 +113,9 @@
|
|||
|
||||
if (context)
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||
if (kCGLNoError == CGLEnable([context CGLContextObj], kCGLCEMPEngine))
|
||||
{
|
||||
NSLog(@"Multithreaded OpenGL enabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Multithreaded OpenGL not supported on your system.");
|
||||
}
|
||||
#endif
|
||||
// The following silently fails if not supported
|
||||
CGLEnable([context CGLContextObj], 313);
|
||||
|
||||
long swapInterval = 1;
|
||||
[context setValues: &swapInterval
|
||||
forParameter: NSOpenGLCPSwapInterval];
|
||||
|
|
Loading…
Reference in New Issue