filename | src/drivers/video_nsgl.c |
changeset | 736:a02d1475ccfd |
prev | 681:1755a126b109 |
next | 757:2780bc393e7c |
author | nkeynes |
date | Mon Jul 14 07:44:42 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Re-indent everything consistently Fix include guards for consistency as well |
file | annotate | diff | log | raw |
1.1 --- a/src/drivers/video_nsgl.c Sun Jun 01 00:47:45 2008 +00001.2 +++ b/src/drivers/video_nsgl.c Mon Jul 14 07:44:42 2008 +00001.3 @@ -26,27 +26,27 @@1.4 gboolean video_nsgl_init_driver( NSView *view, display_driver_t driver )1.5 {1.6 NSAutoreleasePool *pool = [NSAutoreleasePool new];1.7 - NSOpenGLPixelFormatAttribute attributes[] = {1.8 - NSOpenGLPFAWindow,1.9 -// NSOpenGLPFADoubleBuffer,1.10 - NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)24,1.11 - (NSOpenGLPixelFormatAttribute)nil };1.12 -1.13 - NSOpenGLPixelFormat *pixelFormat =1.14 - [[[NSOpenGLPixelFormat alloc] initWithAttributes: attributes] autorelease];1.15 - nsgl_context =1.16 - [[NSOpenGLContext alloc] initWithFormat: pixelFormat shareContext: nil];1.17 - [nsgl_context setView: view];1.18 - [nsgl_context makeCurrentContext];1.19 - [pool release];1.20 - if( gl_fbo_is_supported() ) {1.21 - gl_fbo_init(driver);1.22 - } else {1.23 - ERROR( "FBO not supported" );1.24 - return FALSE;1.25 - }1.26 + NSOpenGLPixelFormatAttribute attributes[] = {1.27 + NSOpenGLPFAWindow,1.28 + // NSOpenGLPFADoubleBuffer,1.29 + NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)24,1.30 + (NSOpenGLPixelFormatAttribute)nil };1.32 - return TRUE;1.33 + NSOpenGLPixelFormat *pixelFormat =1.34 + [[[NSOpenGLPixelFormat alloc] initWithAttributes: attributes] autorelease];1.35 + nsgl_context =1.36 + [[NSOpenGLContext alloc] initWithFormat: pixelFormat shareContext: nil];1.37 + [nsgl_context setView: view];1.38 + [nsgl_context makeCurrentContext];1.39 + [pool release];1.40 + if( gl_fbo_is_supported() ) {1.41 + gl_fbo_init(driver);1.42 + } else {1.43 + ERROR( "FBO not supported" );1.44 + return FALSE;1.45 + }1.46 +1.47 + return TRUE;1.48 }1.50 void video_nsgl_update()1.51 @@ -72,9 +72,9 @@1.53 void video_nsgl_shutdown()1.54 {1.55 - if( nsgl_context != nil ) {1.56 - [NSOpenGLContext clearCurrentContext];1.57 - [nsgl_context release];1.58 - nsgl_context = nil;1.59 - }1.60 + if( nsgl_context != nil ) {1.61 + [NSOpenGLContext clearCurrentContext];1.62 + [nsgl_context release];1.63 + nsgl_context = nil;1.64 + }1.65 }
.