src/video/ataricommon/SDL_atarigl.c
changeset 1361 19418e4422cb
parent 1358 c71e05b4dc2e
child 1379 c0a74f199ecf
     1.1 --- a/src/video/ataricommon/SDL_atarigl.c	Fri Feb 10 07:29:08 2006 +0000
     1.2 +++ b/src/video/ataricommon/SDL_atarigl.c	Thu Feb 16 10:11:48 2006 +0000
     1.3 @@ -24,7 +24,7 @@
     1.4  
     1.5  /*--- Includes ---*/
     1.6  
     1.7 -#ifdef HAVE_OPENGL
     1.8 +#if SDL_VIDEO_OPENGL
     1.9  #include <GL/osmesa.h>
    1.10  #endif
    1.11  
    1.12 @@ -33,7 +33,7 @@
    1.13  #include "SDL_endian.h"
    1.14  #include "SDL_video.h"
    1.15  #include "SDL_atarigl_c.h"
    1.16 -#ifdef ENABLE_OSMESA_SHARED
    1.17 +#if SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
    1.18  #include "SDL_loadso.h"
    1.19  #endif
    1.20  
    1.21 @@ -49,7 +49,7 @@
    1.22  
    1.23  static void SDL_AtariGL_UnloadLibrary(_THIS);
    1.24  
    1.25 -#ifdef HAVE_OPENGL
    1.26 +#if SDL_VIDEO_OPENGL
    1.27  static void CopyShadowNull(_THIS, SDL_Surface *surface);
    1.28  static void CopyShadowDirect(_THIS, SDL_Surface *surface);
    1.29  static void CopyShadowRGBTo555(_THIS, SDL_Surface *surface);
    1.30 @@ -76,7 +76,7 @@
    1.31  
    1.32  int SDL_AtariGL_Init(_THIS, SDL_Surface *current)
    1.33  {
    1.34 -#ifdef HAVE_OPENGL
    1.35 +#if SDL_VIDEO_OPENGL
    1.36  	if (gl_oldmesa) {
    1.37  		gl_active = InitOld(this, current);		
    1.38  	} else {
    1.39 @@ -89,7 +89,7 @@
    1.40  
    1.41  void SDL_AtariGL_Quit(_THIS, SDL_bool unload)
    1.42  {
    1.43 -#ifdef HAVE_OPENGL
    1.44 +#if SDL_VIDEO_OPENGL
    1.45  	if (gl_oldmesa) {
    1.46  		/* Old mesa implementations */
    1.47  		if (this->gl_data->OSMesaDestroyLDG) {
    1.48 @@ -113,15 +113,15 @@
    1.49  		SDL_AtariGL_UnloadLibrary(this);
    1.50  	}
    1.51  
    1.52 -#endif /* HAVE_OPENGL */
    1.53 +#endif /* SDL_VIDEO_OPENGL */
    1.54  	gl_active = 0;
    1.55  }
    1.56  
    1.57  int SDL_AtariGL_LoadLibrary(_THIS, const char *path)
    1.58  {
    1.59 -#ifdef HAVE_OPENGL
    1.60 +#if SDL_VIDEO_OPENGL
    1.61  
    1.62 -#ifdef ENABLE_OSMESA_SHARED
    1.63 +#if SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
    1.64  	void *handle;
    1.65  	SDL_bool cancel_load;
    1.66  
    1.67 @@ -237,7 +237,7 @@
    1.68  void *SDL_AtariGL_GetProcAddress(_THIS, const char *proc)
    1.69  {
    1.70  	void *func = NULL;
    1.71 -#ifdef HAVE_OPENGL
    1.72 +#if SDL_VIDEO_OPENGL
    1.73  
    1.74  	if (this->gl_config.dll_handle) {
    1.75  		func = SDL_LoadFunction(this->gl_config.dll_handle, (void *)proc);
    1.76 @@ -251,7 +251,7 @@
    1.77  
    1.78  int SDL_AtariGL_GetAttribute(_THIS, SDL_GLattr attrib, int* value)
    1.79  {
    1.80 -#ifdef HAVE_OPENGL
    1.81 +#if SDL_VIDEO_OPENGL
    1.82  	GLenum mesa_attrib;
    1.83  	SDL_Surface *surface;
    1.84  
    1.85 @@ -307,7 +307,7 @@
    1.86  
    1.87  int SDL_AtariGL_MakeCurrent(_THIS)
    1.88  {
    1.89 -#ifdef HAVE_OPENGL
    1.90 +#if SDL_VIDEO_OPENGL
    1.91  	SDL_Surface *surface;
    1.92  	GLenum type;
    1.93  
    1.94 @@ -351,7 +351,7 @@
    1.95  
    1.96  void SDL_AtariGL_SwapBuffers(_THIS)
    1.97  {
    1.98 -#ifdef HAVE_OPENGL
    1.99 +#if SDL_VIDEO_OPENGL
   1.100  	if (gl_active) {
   1.101  		if (this->gl_config.dll_handle) {
   1.102  			if (this->gl_data->glFinish) {
   1.103 @@ -370,7 +370,7 @@
   1.104  
   1.105  void SDL_AtariGL_InitPointers(_THIS)
   1.106  {
   1.107 -#if defined(HAVE_OPENGL)
   1.108 +#if SDL_VIDEO_OPENGL
   1.109  	this->gl_data->OSMesaCreateContextExt = OSMesaCreateContextExt;
   1.110  	this->gl_data->OSMesaDestroyContext = OSMesaDestroyContext;
   1.111  	this->gl_data->OSMesaMakeCurrent = OSMesaMakeCurrent;
   1.112 @@ -390,7 +390,7 @@
   1.113  
   1.114  static void SDL_AtariGL_UnloadLibrary(_THIS)
   1.115  {
   1.116 -#if defined(HAVE_OPENGL)
   1.117 +#if SDL_VIDEO_OPENGL
   1.118  	if (this->gl_config.dll_handle) {
   1.119  		SDL_UnloadObject(this->gl_config.dll_handle);
   1.120  		this->gl_config.dll_handle = NULL;
   1.121 @@ -403,7 +403,7 @@
   1.122  
   1.123  /*--- Creation of an OpenGL context using new/old functions ---*/
   1.124  
   1.125 -#ifdef HAVE_OPENGL
   1.126 +#if SDL_VIDEO_OPENGL
   1.127  static int InitNew(_THIS, SDL_Surface *current)
   1.128  {
   1.129  	GLenum osmesa_format;
   1.130 @@ -1084,4 +1084,4 @@
   1.131  	}
   1.132  }
   1.133  
   1.134 -#endif /* HAVE_OPENGL */
   1.135 +#endif /* SDL_VIDEO_OPENGL */