src/video/ataricommon/SDL_atarigl_c.h
changeset 989 475166d13b44
child 991 12b13601a544
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/ataricommon/SDL_atarigl_c.h	Thu Nov 25 15:47:49 2004 +0000
     1.3 @@ -0,0 +1,62 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2004 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Library General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Library General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Library General Public
    1.19 +    License along with this library; if not, write to the Free
    1.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +
    1.26 +/* Atari OSMesa.ldg implementation of SDL OpenGL support */
    1.27 +
    1.28 +#ifndef _SDL_ATARIGL_H_
    1.29 +#define _SDL_ATARIGL_H_
    1.30 +
    1.31 +#ifdef HAVE_OPENGL
    1.32 +#include <GL/osmesa.h>
    1.33 +#endif
    1.34 +
    1.35 +#include "SDL_sysvideo.h"
    1.36 +#define _THIS   SDL_VideoDevice *this
    1.37 +
    1.38 +struct SDL_PrivateGLData {
    1.39 +	/* to stop switching drivers while we have a valid context */
    1.40 +    int gl_active; 
    1.41 +
    1.42 +	/* for unsupported OSMesa buffer formats */
    1.43 +	void (*ConvertSurface)(SDL_Surface *surface);	
    1.44 +
    1.45 +#ifdef HAVE_OPENGL
    1.46 +	OSMesaContext	ctx;
    1.47 +#endif
    1.48 +};
    1.49 +
    1.50 +/* Old variable names */
    1.51 +#define gl_active	(this->gl_data->gl_active)
    1.52 +#define gl_ctx		(this->gl_data->ctx)
    1.53 +#define gl_convert	(this->gl_data->ConvertSurface)
    1.54 +
    1.55 +/* OpenGL functions */
    1.56 +extern int SDL_AtariGL_Init(_THIS, SDL_Surface *current);
    1.57 +extern void SDL_AtariGL_Quit(_THIS);
    1.58 +
    1.59 +extern int SDL_AtariGL_LoadLibrary(_THIS, const char *path);
    1.60 +extern void *SDL_AtariGL_GetProcAddress(_THIS, const char *proc);
    1.61 +extern int SDL_AtariGL_GetAttribute(_THIS, SDL_GLattr attrib, int* value);
    1.62 +extern int SDL_AtariGL_MakeCurrent(_THIS);
    1.63 +extern void SDL_AtariGL_SwapBuffers(_THIS);
    1.64 +
    1.65 +#endif /* _SDL_ATARIGL_H_ */