#ifndef CONTEXT_H
#define CONTEXT_H
#include "glapi.h"
#include "mtypes.h"
extern GLvisual *
_mesa_create_visual( GLboolean rgbFlag,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint greenBits,
GLint blueBits,
GLint alphaBits,
GLint indexBits,
GLint depthBits,
GLint stencilBits,
GLint accumRedBits,
GLint accumGreenBits,
GLint accumBlueBits,
GLint accumAlphaBits,
GLint numSamples );
extern GLboolean
_mesa_initialize_visual( GLvisual *v,
GLboolean rgbFlag,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint greenBits,
GLint blueBits,
GLint alphaBits,
GLint indexBits,
GLint depthBits,
GLint stencilBits,
GLint accumRedBits,
GLint accumGreenBits,
GLint accumBlueBits,
GLint accumAlphaBits,
GLint numSamples );
extern void
_mesa_destroy_visual( GLvisual *vis );
extern GLframebuffer *
_mesa_create_framebuffer( const GLvisual *visual,
GLboolean softwareDepth,
GLboolean softwareStencil,
GLboolean softwareAccum,
GLboolean softwareAlpha );
extern void
_mesa_initialize_framebuffer( GLframebuffer *fb,
const GLvisual *visual,
GLboolean softwareDepth,
GLboolean softwareStencil,
GLboolean softwareAccum,
GLboolean softwareAlpha );
extern void
_mesa_free_framebuffer_data( GLframebuffer *buffer );
extern void
_mesa_destroy_framebuffer( GLframebuffer *buffer );
extern GLcontext *
_mesa_create_context( const GLvisual *visual,
GLcontext *share_list,
void *driver_ctx,
GLboolean direct );
extern GLboolean
_mesa_initialize_context( GLcontext *ctx,
const GLvisual *visual,
GLcontext *share_list,
void *driver_ctx,
GLboolean direct );
extern void
_mesa_free_context_data( GLcontext *ctx );
extern void
_mesa_destroy_context( GLcontext *ctx );
extern void
_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
extern void
_mesa_make_current( GLcontext *ctx, GLframebuffer *buffer );
extern void
_mesa_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer );
extern GLcontext *
_mesa_get_current_context(void);
#ifdef THREADS
#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
#else
#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
#endif
extern GLboolean
_mesa_destroyContext(__GLcontext *gc);
extern GLboolean
_mesa_loseCurrent(__GLcontext *gc);
extern GLboolean
_mesa_makeCurrent(__GLcontext *gc);
extern GLboolean
_mesa_shareContext(__GLcontext *gc, __GLcontext *gcShare);
extern GLboolean
_mesa_copyContext(__GLcontext *dst, const __GLcontext *src, GLuint mask);
extern GLboolean
_mesa_forceCurrent(__GLcontext *gc);
extern GLboolean
_mesa_notifyResize(__GLcontext *gc);
extern void
_mesa_notifyDestroy(__GLcontext *gc);
extern void
_mesa_notifySwapBuffers(__GLcontext *gc);
extern struct __GLdispatchStateRec *
_mesa_dispatchExec(__GLcontext *gc);
extern void
_mesa_beginDispatchOverride(__GLcontext *gc);
extern void
_mesa_endDispatchOverride(__GLcontext *gc);
extern struct _glapi_table *
_mesa_get_dispatch(GLcontext *ctx);
extern void
_mesa_record_error( GLcontext *ctx, GLenum error );
extern void
_mesa_Finish( void );
extern void
_mesa_Flush( void );
#endif