1.1 --- a/src/drivers/video_nsgl.c Sat Apr 19 00:36:36 2008 +0000
1.2 +++ b/src/drivers/video_nsgl.c Sun Jul 06 05:35:13 2008 +0000
1.4 #include "drivers/video_gl.h"
1.5 #include "pvr2/glutil.h"
1.7 -static NSOpenGLContext *nsgl_context;
1.8 +static NSOpenGLContext *nsgl_context = nil;
1.10 gboolean video_nsgl_init_driver( NSView *view, display_driver_t driver )
1.12 + NSAutoreleasePool *pool = [NSAutoreleasePool new];
1.13 NSOpenGLPixelFormatAttribute attributes[] = {
1.15 - NSOpenGLPFADoubleBuffer,
1.16 +// NSOpenGLPFADoubleBuffer,
1.17 NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)24,
1.18 (NSOpenGLPixelFormatAttribute)nil };
1.21 [[NSOpenGLContext alloc] initWithFormat: pixelFormat shareContext: nil];
1.22 [nsgl_context setView: view];
1.23 [nsgl_context makeCurrentContext];
1.26 if( gl_fbo_is_supported() ) {
1.27 gl_fbo_init(driver);
1.33 +void video_nsgl_update()
1.35 + if( nsgl_context != nil ) {
1.36 + [nsgl_context update];
1.40 +void video_nsgl_make_current()
1.42 + if( nsgl_context != nil ) {
1.43 + [nsgl_context makeCurrentContext];
1.47 +void video_nsgl_swap_buffers()
1.49 + if( nsgl_context != nil ) {
1.50 + [nsgl_context flushBuffer];
1.54 void video_nsgl_shutdown()
1.56 if( nsgl_context != nil ) {