Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzWindow.m @ 1658:e49147870aac SDL-1.3
glSDL support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 01 May 2006 06:58:33 +0000 |
parents | ef4a796e7f24 |
children | 782fd950bd46 |
comparison
equal
deleted
inserted
replaced
1657:5b0805ceb50f | 1658:e49147870aac |
---|---|
53 @implementation SDL_QuartzWindow | 53 @implementation SDL_QuartzWindow |
54 | 54 |
55 /* we override these methods to fix the miniaturize animation/dock icon bug */ | 55 /* we override these methods to fix the miniaturize animation/dock icon bug */ |
56 - (void)miniaturize:(id)sender | 56 - (void)miniaturize:(id)sender |
57 { | 57 { |
58 if (SDL_VideoSurface->flags & SDL_OPENGL) { | 58 if (SDL_VideoSurface->flags & SDL_INTERNALOPENGL) { |
59 | 59 |
60 /* | 60 /* |
61 Future: Grab framebuffer and put into NSImage | 61 Future: Grab framebuffer and put into NSImage |
62 [ qz_window setMiniwindowImage:image ]; | 62 [ qz_window setMiniwindowImage:image ]; |
63 */ | 63 */ |
84 is required, and the deminiaturize works perfectly. | 84 is required, and the deminiaturize works perfectly. |
85 */ | 85 */ |
86 SDL_VideoDevice *this = (SDL_VideoDevice*)current_video; | 86 SDL_VideoDevice *this = (SDL_VideoDevice*)current_video; |
87 | 87 |
88 /* make sure pixels are fully opaque */ | 88 /* make sure pixels are fully opaque */ |
89 if (! ( SDL_VideoSurface->flags & SDL_OPENGL ) ) | 89 if (! ( SDL_VideoSurface->flags & SDL_INTERNALOPENGL ) ) |
90 QZ_SetPortAlphaOpaque (); | 90 QZ_SetPortAlphaOpaque (); |
91 | 91 |
92 /* save current visible SDL surface */ | 92 /* save current visible SDL surface */ |
93 [ self cacheImageInRect:[ window_view frame ] ]; | 93 [ self cacheImageInRect:[ window_view frame ] ]; |
94 | 94 |
124 newViewFrame = [ window_view frame ]; | 124 newViewFrame = [ window_view frame ]; |
125 | 125 |
126 SDL_PrivateResize (newViewFrame.size.width, newViewFrame.size.height); | 126 SDL_PrivateResize (newViewFrame.size.width, newViewFrame.size.height); |
127 | 127 |
128 /* If not OpenGL, we have to update the pixels and pitch */ | 128 /* If not OpenGL, we have to update the pixels and pitch */ |
129 if ( ! ( SDL_VideoSurface->flags & SDL_OPENGL ) ) { | 129 if ( ! ( SDL_VideoSurface->flags & SDL_INTERNALOPENGL ) ) { |
130 | 130 |
131 CGrafPtr thePort = [ window_view qdPort ]; | 131 CGrafPtr thePort = [ window_view qdPort ]; |
132 LockPortBits ( thePort ); | 132 LockPortBits ( thePort ); |
133 | 133 |
134 SDL_VideoSurface->pixels = GetPixBaseAddr ( GetPortPixMap ( thePort ) ); | 134 SDL_VideoSurface->pixels = GetPixBaseAddr ( GetPortPixMap ( thePort ) ); |
162 SDL_VideoDevice *this = (SDL_VideoDevice*)current_video; | 162 SDL_VideoDevice *this = (SDL_VideoDevice*)current_video; |
163 | 163 |
164 if ( this ) { | 164 if ( this ) { |
165 | 165 |
166 /* make sure pixels are fully opaque */ | 166 /* make sure pixels are fully opaque */ |
167 if (! ( SDL_VideoSurface->flags & SDL_OPENGL ) ) | 167 if (! ( SDL_VideoSurface->flags & SDL_INTERNALOPENGL ) ) |
168 QZ_SetPortAlphaOpaque (); | 168 QZ_SetPortAlphaOpaque (); |
169 | 169 |
170 /* save current visible SDL surface */ | 170 /* save current visible SDL surface */ |
171 [ self cacheImageInRect:[ window_view frame ] ]; | 171 [ self cacheImageInRect:[ window_view frame ] ]; |
172 } | 172 } |