comparison src/video/macdsp/SDL_dspvideo.c @ 1032:c1c2efca4548

Date: Mon, 24 Jan 2005 21:37:56 +0800 From: Chris Taylor Subject: Patch to put back dynamic OpenGL loading for MPW I sent a patch a while ago that removes dynamic OpenGL loading for Macintosh Programmer's Workshop. Dynamic loading DOES actually work when an SDL program is built with MPW, it just has to be set up for it. (Whoops!!) This is the ideal way to get OpenGL extensions to work, which D2X uses quite a few of. This patch puts dynamic loading back in SDL for Mac OS 9. It applies to current CVS. I noticed that two members need to be set when DrawSprocket is used.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 25 Jan 2005 16:57:11 +0000
parents b8d311d90021
children 609c060fd2a2
comparison
equal deleted inserted replaced
1031:3cf036d8861f 1032:c1c2efca4548
296 device->FlipHWSurface = DSp_FlipHWSurface; 296 device->FlipHWSurface = DSp_FlipHWSurface;
297 device->FreeHWSurface = DSp_FreeHWSurface; 297 device->FreeHWSurface = DSp_FreeHWSurface;
298 #ifdef HAVE_OPENGL 298 #ifdef HAVE_OPENGL
299 device->GL_MakeCurrent = Mac_GL_MakeCurrent; 299 device->GL_MakeCurrent = Mac_GL_MakeCurrent;
300 device->GL_SwapBuffers = DSp_GL_SwapBuffers; 300 device->GL_SwapBuffers = DSp_GL_SwapBuffers;
301 device->GL_LoadLibrary = Mac_GL_LoadLibrary;
302 device->GL_GetProcAddress = Mac_GL_GetProcAddress;
301 #endif 303 #endif
302 device->SetCaption = NULL; 304 device->SetCaption = NULL;
303 device->SetIcon = NULL; 305 device->SetIcon = NULL;
304 device->IconifyWindow = NULL; 306 device->IconifyWindow = NULL;
305 device->GrabInput = NULL; 307 device->GrabInput = NULL;
788 #else 790 #else
789 if ( noErr != DMGetDisplayIDByGDevice (SDL_Display, &display_id, SDL_FALSE) ) { 791 if ( noErr != DMGetDisplayIDByGDevice (SDL_Display, &display_id, SDL_FALSE) ) {
790 SDL_SetError ("Display Manager couldn't associate GDevice with display_id"); 792 SDL_SetError ("Display Manager couldn't associate GDevice with display_id");
791 return NULL; 793 return NULL;
792 } 794 }
793 if ( DSpFindBestContextOnDisplayID (&attrib, &dsp_context, display_id) != noErr ) { 795 if ( DSpFindBestContextOnDisplayID(&attrib, &dsp_context, display_id) != noErr ) {
794 SDL_SetError ("DrawSprocket couldn't find a suitable context on given display"); 796 SDL_SetError ("DrawSprocket couldn't find a suitable context on given display");
795 return NULL; 797 return NULL;
796 } 798 }
797 799
798 #endif 800 #endif