diff src/video/ataricommon/SDL_atarigl_c.h @ 992:0324ce32b2d9

Keep current OpenGL context when possible
author Patrice Mandin <patmandin@gmail.com>
date Fri, 26 Nov 2004 22:11:30 +0000
parents 12b13601a544
children 2662da16d668
line wrap: on
line diff
--- a/src/video/ataricommon/SDL_atarigl_c.h	Fri Nov 26 16:16:50 2004 +0000
+++ b/src/video/ataricommon/SDL_atarigl_c.h	Fri Nov 26 22:11:30 2004 +0000
@@ -61,6 +61,11 @@
 	/* mesa_gl.ldg, tiny_gl.ldg */
 	void *(*OSMesaCreateLDG)( long format, long type, long width, long height );
 	void (*OSMesaDestroyLDG)(void);
+
+	/* Info needed to compare existing context with new asked one */
+	int width, height;
+	GLenum format;
+	GLint depth,stencil,accum;
 };
 
 /* Variable names */
@@ -71,10 +76,16 @@
 #define gl_shadow	(this->gl_data->gl_shadow)
 #define gl_convert	(this->gl_data->ConvertSurface)
 #define gl_copyshadow	(this->gl_data->CopyShadow)
+#define gl_curformat	(this->gl_data->format)
+#define gl_curdepth		(this->gl_data->depth)
+#define gl_curstencil	(this->gl_data->stencil)
+#define gl_curaccum		(this->gl_data->accum)
+#define gl_curwidth	(this->gl_data->width)
+#define gl_curheight		(this->gl_data->height)
 
 /* OpenGL functions */
 extern int SDL_AtariGL_Init(_THIS, SDL_Surface *current);
-extern void SDL_AtariGL_Quit(_THIS);
+extern void SDL_AtariGL_Quit(_THIS, SDL_bool unload);
 extern void SDL_AtariGL_InitPointers(_THIS);
 
 extern int SDL_AtariGL_LoadLibrary(_THIS, const char *path);