Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoawindow.m @ 1952:420716272158
Implemented X11 OpenGL support.
Added support for the SDL_VIDEO_OPENGL environment variable.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 28 Jul 2006 08:43:17 +0000 |
parents | 7177581dc9fa |
children | ba0d62354872 |
comparison
equal
deleted
inserted
replaced
1951:7177581dc9fa | 1952:420716272158 |
---|---|
383 | 383 |
384 if (SetupWindowData(_this, window, nswindow, SDL_TRUE) < 0) { | 384 if (SetupWindowData(_this, window, nswindow, SDL_TRUE) < 0) { |
385 [nswindow release]; | 385 [nswindow release]; |
386 return -1; | 386 return -1; |
387 } | 387 } |
388 #ifdef SDL_VIDEO_OPENGL | 388 #ifdef SDL_VIDEO_OPENGL_CGL |
389 if (window->flags & SDL_WINDOW_OPENGL) { | 389 if (window->flags & SDL_WINDOW_OPENGL) { |
390 if (Cocoa_GL_SetupWindow(_this, window) < 0) { | 390 if (Cocoa_GL_SetupWindow(_this, window) < 0) { |
391 Cocoa_DestroyWindow(_this, window); | 391 Cocoa_DestroyWindow(_this, window); |
392 return -1; | 392 return -1; |
393 } | 393 } |
533 { | 533 { |
534 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 534 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
535 SDL_WindowData *data = (SDL_WindowData *) window->driverdata; | 535 SDL_WindowData *data = (SDL_WindowData *) window->driverdata; |
536 | 536 |
537 if (data) { | 537 if (data) { |
538 #ifdef SDL_VIDEO_OPENGL | 538 #ifdef SDL_VIDEO_OPENGL_CGL |
539 if (window->flags & SDL_WINDOW_OPENGL) { | 539 if (window->flags & SDL_WINDOW_OPENGL) { |
540 Cocoa_GL_CleanupWindow(_this, window); | 540 Cocoa_GL_CleanupWindow(_this, window); |
541 } | 541 } |
542 #endif | 542 #endif |
543 [data->listener close]; | 543 [data->listener close]; |