comparison src/video/cocoa/SDL_cocoaopengl.m @ 1970:db3ba6c0d0df

Allow the render context to do necessary work when the video mode changes.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 06 Aug 2006 04:39:13 +0000
parents 420716272158
children 81255f93dfcd
comparison
equal deleted inserted replaced
1969:5d3724f64f2b 1970:db3ba6c0d0df
266 if (context) { 266 if (context) {
267 SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata; 267 SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
268 NSOpenGLContext *nscontext = (NSOpenGLContext *)context; 268 NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
269 269
270 [nscontext setView:[windowdata->window contentView]]; 270 [nscontext setView:[windowdata->window contentView]];
271 [nscontext update];
271 [nscontext makeCurrentContext]; 272 [nscontext makeCurrentContext];
272 } else { 273 } else {
273 [NSOpenGLContext clearCurrentContext]; 274 [NSOpenGLContext clearCurrentContext];
274 } 275 }
275 276