more work on GL_ARB_texture_compression
[mesa.git] / src / mesa / main / context.h
index 192549da907c001064b95fcbdfbfff4bac1f4177..581931153ce96bf51ec13bb710dbf9026f81d6fd 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: context.h,v 1.12 2000/01/28 20:17:42 brianp Exp $ */
+/* $Id: context.h,v 1.17 2000/05/04 13:53:55 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
  * the colorbuffer, depth buffer, stencil buffer and accum buffer which will
  * be used by the GL context and framebuffer.
  */
-extern GLvisual *gl_create_visual( GLboolean rgbFlag,
-                                   GLboolean alphaFlag,
-                                   GLboolean dbFlag,
-                                   GLboolean stereoFlag,
-                                   GLint depthBits,
-                                   GLint stencilBits,
-                                   GLint accumBits,
-                                   GLint indexBits,
-                                   GLint redBits,
-                                   GLint greenBits,
-                                   GLint blueBits,
-                                   GLint alphaBits );
-
-extern void gl_destroy_visual( GLvisual *vis );
+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 );
+
+/* this function is obsolete */
+extern GLvisual *
+gl_create_visual( GLboolean rgbFlag,
+                  GLboolean alphaFlag,
+                  GLboolean dbFlag,
+                  GLboolean stereoFlag,
+                  GLint depthBits,
+                  GLint stencilBits,
+                  GLint accumBits,
+                  GLint indexBits,
+                  GLint redBits,
+                  GLint greenBits,
+                  GLint blueBits,
+                  GLint alphaBits );
+
+
+extern void
+_mesa_destroy_visual( GLvisual *vis );
+
+/*obsolete */ extern void gl_destroy_visual( GLvisual *vis );
+
 
 
 /*
@@ -78,13 +120,23 @@ extern void gl_destroy_visual( GLvisual *vis );
  * It bundles up the depth buffer, stencil buffer and accum buffers into a
  * single entity.
  */
-extern GLframebuffer *gl_create_framebuffer( GLvisual *visual,
-                                             GLboolean softwareDepth,
-                                             GLboolean softwareStencil,
-                                             GLboolean softwareAccum,
-                                             GLboolean softwareAlpha );
+extern GLframebuffer *
+gl_create_framebuffer( GLvisual *visual,
+                       GLboolean softwareDepth,
+                       GLboolean softwareStencil,
+                       GLboolean softwareAccum,
+                       GLboolean softwareAlpha );
+
+extern void
+_mesa_initialize_framebuffer( GLframebuffer *fb,
+                              GLvisual *visual,
+                              GLboolean softwareDepth,
+                              GLboolean softwareStencil,
+                              GLboolean softwareAccum,
+                              GLboolean softwareAlpha );
 
-extern void gl_destroy_framebuffer( GLframebuffer *buffer );
+extern void
+gl_destroy_framebuffer( GLframebuffer *buffer );
 
 
 
@@ -92,36 +144,46 @@ extern void gl_destroy_framebuffer( GLframebuffer *buffer );
  * Create/destroy a GLcontext.  A GLcontext is like a GLX context.  It
  * contains the rendering state.
  */
-extern GLcontext *gl_create_context( GLvisual *visual,
-                                     GLcontext *share_list,
-                                     void *driver_ctx,
-                                     GLboolean direct);
+extern GLcontext *
+gl_create_context( GLvisual *visual,
+                   GLcontext *share_list,
+                   void *driver_ctx,
+                   GLboolean direct);
+
+extern GLboolean
+_mesa_initialize_context( GLcontext *ctx,
+                          GLvisual *visual,
+                          GLcontext *share_list,
+                          void *driver_ctx,
+                          GLboolean direct );
 
-extern GLboolean gl_initialize_context_data( GLcontext *ctx,
-                                             GLvisual *visual,
-                                             GLcontext *share_list,
-                                             void *driver_ctx,
-                                             GLboolean direct );
+extern void
+gl_free_context_data( GLcontext *ctx );
 
-extern void gl_free_context_data( GLcontext *ctx );
+extern void
+gl_destroy_context( GLcontext *ctx );
 
-extern void gl_destroy_context( GLcontext *ctx );
 
+extern void
+gl_context_initialize( GLcontext *ctx );
 
-extern void gl_context_initialize( GLcontext *ctx );
 
+extern void
+gl_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
 
-extern void gl_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
 
+extern void
+gl_make_current( GLcontext *ctx, GLframebuffer *buffer );
 
-extern void gl_make_current( GLcontext *ctx, GLframebuffer *buffer );
 
+extern void
+gl_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer,
+                  GLframebuffer *readBuffer );
 
-extern void gl_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer,
-                              GLframebuffer *readBuffer );
 
+extern GLcontext *
+gl_get_current_context(void);
 
-extern GLcontext *gl_get_current_context(void);
 
 
 /*
@@ -142,7 +204,7 @@ do {                                        \
 
 extern struct immediate *_mesa_CurrentInput;
 
-#define GET_CURRENT_CONTEXT(C)  GLcontext *C = _glapi_Context
+#define GET_CURRENT_CONTEXT(C)  GLcontext *C = (GLcontext *) _glapi_Context
 
 #define GET_IMMEDIATE struct immediate *IM = _mesa_CurrentInput
 
@@ -166,37 +228,36 @@ _mesa_get_dispatch(GLcontext *ctx);
 
 
 /*
- * GL_MESA_resize_buffers extension
+ * Miscellaneous
  */
-extern void _mesa_ResizeBuffersMESA( void );
-
 
+extern void
+gl_problem( const GLcontext *ctx, const char *s );
 
-/*
- * Miscellaneous
- */
+extern void
+gl_warning( const GLcontext *ctx, const char *s );
 
-extern void gl_problem( const GLcontext *ctx, const char *s );
+extern void
+gl_error( GLcontext *ctx, GLenum error, const char *s );
 
-extern void gl_warning( const GLcontext *ctx, const char *s );
+extern void
+gl_compile_error( GLcontext *ctx, GLenum error, const char *s );
 
-extern void gl_error( GLcontext *ctx, GLenum error, const char *s );
 
-extern void gl_compile_error( GLcontext *ctx, GLenum error, const char *s );
 
-extern void gl_update_state( GLcontext *ctx );
+extern void
+_mesa_Finish( void );
 
+extern void
+_mesa_Flush( void );
 
-/* for debugging */
-extern void gl_print_state( const char *msg, GLuint state );
 
-/* for debugging */
-extern void gl_print_enable_flags( const char *msg, GLuint flags );
 
+extern void
+_mesa_init_no_op_table(struct _glapi_table *exec);
 
-#ifdef PROFILE
-extern GLdouble gl_time( void );
-#endif
+extern void
+_mesa_init_exec_table(struct _glapi_table *exec);
 
 
 #endif