src/video/ataricommon/SDL_atarigl_c.h
changeset 991 12b13601a544
parent 989 475166d13b44
child 992 0324ce32b2d9
     1.1 --- a/src/video/ataricommon/SDL_atarigl_c.h	Fri Nov 26 16:13:24 2004 +0000
     1.2 +++ b/src/video/ataricommon/SDL_atarigl_c.h	Fri Nov 26 16:16:50 2004 +0000
     1.3 @@ -33,25 +33,49 @@
     1.4  #define _THIS   SDL_VideoDevice *this
     1.5  
     1.6  struct SDL_PrivateGLData {
     1.7 -	/* to stop switching drivers while we have a valid context */
     1.8 -    int gl_active; 
     1.9 +
    1.10 +    int gl_active; 	/* to stop switching drivers while we have a valid context */
    1.11 +	
    1.12 +	int gl_oldmesa;	/* Old OpenGL support ? */
    1.13 +
    1.14 +	int	gl_pixelsize;	/* for CopyShadow functions */
    1.15 +
    1.16 +	Uint8 *gl_shadow;	/* Shadow buffer for old implementations */
    1.17  
    1.18  	/* for unsupported OSMesa buffer formats */
    1.19 -	void (*ConvertSurface)(SDL_Surface *surface);	
    1.20 +	void (*ConvertSurface)(_THIS, SDL_Surface *surface);	
    1.21  
    1.22 -#ifdef HAVE_OPENGL
    1.23 +	/* to convert the shadow buffer to the screen format */
    1.24 +	void (*CopyShadow)(_THIS, SDL_Surface *surface);	
    1.25 +
    1.26  	OSMesaContext	ctx;
    1.27 -#endif
    1.28 +
    1.29 +	/* osmesa.ldg */
    1.30 +	OSMesaContext (*OSMesaCreateContextExt)( GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, OSMesaContext sharelist);
    1.31 +	void (*OSMesaDestroyContext)( OSMesaContext ctx );
    1.32 +	GLboolean (*OSMesaMakeCurrent)( OSMesaContext ctx, void *buffer, GLenum type, GLsizei width, GLsizei height );
    1.33 +	void (*OSMesaPixelStore)( GLint pname, GLint value );
    1.34 +	void * (*OSMesaGetProcAddress)( const char *funcName );
    1.35 +	void (*glGetIntegerv)( GLenum pname, GLint *value );
    1.36 +
    1.37 +	/* mesa_gl.ldg, tiny_gl.ldg */
    1.38 +	void *(*OSMesaCreateLDG)( long format, long type, long width, long height );
    1.39 +	void (*OSMesaDestroyLDG)(void);
    1.40  };
    1.41  
    1.42 -/* Old variable names */
    1.43 +/* Variable names */
    1.44  #define gl_active	(this->gl_data->gl_active)
    1.45  #define gl_ctx		(this->gl_data->ctx)
    1.46 +#define gl_oldmesa	(this->gl_data->gl_oldmesa)
    1.47 +#define gl_pixelsize	(this->gl_data->gl_pixelsize)
    1.48 +#define gl_shadow	(this->gl_data->gl_shadow)
    1.49  #define gl_convert	(this->gl_data->ConvertSurface)
    1.50 +#define gl_copyshadow	(this->gl_data->CopyShadow)
    1.51  
    1.52  /* OpenGL functions */
    1.53  extern int SDL_AtariGL_Init(_THIS, SDL_Surface *current);
    1.54  extern void SDL_AtariGL_Quit(_THIS);
    1.55 +extern void SDL_AtariGL_InitPointers(_THIS);
    1.56  
    1.57  extern int SDL_AtariGL_LoadLibrary(_THIS, const char *path);
    1.58  extern void *SDL_AtariGL_GetProcAddress(_THIS, const char *proc);