Mercurial > sdl-ios-xcode
comparison src/video/xbios/SDL_xbios.c @ 991:12b13601a544
Final touches to OSMesa OpenGL support on Atari, using loadable libraries. Hope SDL 1.2.8 is out soon.
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Fri, 26 Nov 2004 16:16:50 +0000 |
parents | 475166d13b44 |
children | 0324ce32b2d9 |
comparison
equal
deleted
inserted
replaced
990:8e20c48a9c13 | 991:12b13601a544 |
---|---|
409 this->info.video_mem = (Uint32) Atari_SysMalloc(-1L, MX_STRAM); | 409 this->info.video_mem = (Uint32) Atari_SysMalloc(-1L, MX_STRAM); |
410 | 410 |
411 /* Init chunky to planar routine */ | 411 /* Init chunky to planar routine */ |
412 SDL_Atari_C2pConvert = SDL_Atari_C2pConvert8; | 412 SDL_Atari_C2pConvert = SDL_Atari_C2pConvert8; |
413 | 413 |
414 #ifdef HAVE_OPENGL | |
415 SDL_AtariGL_InitPointers(this); | |
416 #endif | |
417 | |
414 /* We're done! */ | 418 /* We're done! */ |
415 return(0); | 419 return(0); |
416 } | 420 } |
417 | 421 |
418 static SDL_Rect **XBIOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) | 422 static SDL_Rect **XBIOS_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) |
429 static void XBIOS_FreeBuffers(_THIS) | 433 static void XBIOS_FreeBuffers(_THIS) |
430 { | 434 { |
431 int i; | 435 int i; |
432 | 436 |
433 #ifdef HAVE_OPENGL | 437 #ifdef HAVE_OPENGL |
434 SDL_AtariGL_Quit(this); | 438 if (gl_active) { |
439 SDL_AtariGL_Quit(this); | |
440 } | |
435 #endif | 441 #endif |
436 | 442 |
437 for (i=0;i<2;i++) { | 443 for (i=0;i<2;i++) { |
438 if (XBIOS_screensmem[i]!=NULL) { | 444 if (XBIOS_screensmem[i]!=NULL) { |
439 Mfree(XBIOS_screensmem[i]); | 445 Mfree(XBIOS_screensmem[i]); |
874 | 880 |
875 #ifdef HAVE_OPENGL | 881 #ifdef HAVE_OPENGL |
876 | 882 |
877 static void XBIOS_GL_SwapBuffers(_THIS) | 883 static void XBIOS_GL_SwapBuffers(_THIS) |
878 { | 884 { |
879 if (gl_ctx == NULL) { | 885 if (gl_active) { |
880 return; | 886 gl_copyshadow(this, this->screen); |
881 } | 887 gl_convert(this, this->screen); |
882 | 888 XBIOS_FlipHWSurface(this, this->screen); |
883 XBIOS_FlipHWSurface(this, this->screen); | 889 SDL_AtariGL_MakeCurrent(this); |
884 SDL_AtariGL_MakeCurrent(this); | 890 } |
885 } | 891 } |
886 | 892 |
887 #endif | 893 #endif |