Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything.
[mesa.git] / include / GL / osmesa.h
index 11423a8e3d01158120ff0568740285d6a9947d3a..cf892b91c939dfa9d5eca22975e3842e32e721a0 100644 (file)
@@ -1,10 +1,8 @@
-/* $Id: osmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
-
 /*
  * Mesa 3-D graphics library
- * Version:  3.1
+ * Version:  4.1
  * 
- * Copyright (C) 1999  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  */
 
 
-/*
- * $Log: osmesa.h,v $
- * Revision 1.1  1999/08/19 00:55:40  jtg
- * Initial revision
- *
- * Revision 1.4  1999/02/14 03:39:09  brianp
- * new copyright
- *
- * Revision 1.3  1999/01/03 02:52:30  brianp
- * now using GLAPI and GLAPIENTRY keywords (Ted Jump)
- *
- * Revision 1.2  1998/07/26 01:33:51  brianp
- * added WINGDIAPI and APIENTRY keywords per Ted Jump
- *
- * Revision 1.1  1998/02/13 03:17:50  brianp
- * Initial revision
- *
- */
-
-
 /*
  * Mesa Off-Screen rendering interface.
  *
  */
 
 
-
 #ifndef OSMESA_H
 #define OSMESA_H
 
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 
-#include "GL/gl.h"
+#include <GL/gl.h>
 
 
-
-#define OSMESA_MAJOR_VERSION 3
-#define OSMESA_MINOR_VERSION 0
+#define OSMESA_MAJOR_VERSION 4
+#define OSMESA_MINOR_VERSION 1
+#define OSMESA_PATCH_VERSION 0
 
 
 
@@ -100,6 +76,7 @@ extern "C" {
 #define OSMESA_ARGB            0x2
 #define OSMESA_RGB             GL_RGB
 #define OSMESA_BGR             0x4
+#define OSMESA_RGB_565         0x5
 
 
 /*
@@ -117,7 +94,8 @@ extern "C" {
 #define OSMESA_HEIGHT          0x21
 #define OSMESA_FORMAT          0x22
 #define OSMESA_TYPE            0x23
-
+#define OSMESA_MAX_WIDTH       0x24  /* new in 4.0 */
+#define OSMESA_MAX_HEIGHT      0x25  /* new in 4.0 */
 
 
 typedef struct osmesa_context *OSMesaContext;
@@ -138,18 +116,31 @@ typedef struct osmesa_context *OSMesaContext;
  *                     display lists.  NULL indicates no sharing.
  * Return:  an OSMesaContext or 0 if error
  */
-GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format,
-                                          OSMesaContext sharelist );
+GLAPI OSMesaContext GLAPIENTRY
+OSMesaCreateContext( GLenum format, OSMesaContext sharelist );
 
 
 
+/*
+ * Create an Off-Screen Mesa rendering context and specify desired
+ * size of depth buffer, stencil buffer and accumulation buffer.
+ * If you specify zero for depthBits, stencilBits, accumBits you
+ * can save some memory.
+ *
+ * New in Mesa 3.5
+ */
+GLAPI OSMesaContext GLAPIENTRY
+OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
+                        GLint accumBits, OSMesaContext sharelist);
+
 
 /*
  * Destroy an Off-Screen Mesa rendering context.
  *
  * Input:  ctx - the context to destroy
  */
-GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
+GLAPI void GLAPIENTRY
+OSMesaDestroyContext( OSMesaContext ctx );
 
 
 
@@ -180,9 +171,9 @@ GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
  *          invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
  *          width>internal limit or height>internal limit.
  */
-GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
-                                    void *buffer, GLenum type,
-                                    GLsizei width, GLsizei height );
+GLAPI GLboolean GLAPIENTRY
+OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
+                   GLsizei width, GLsizei height );
 
 
 
@@ -190,7 +181,8 @@ GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
 /*
  * Return the current Off-Screen Mesa rendering context handle.
  */
-GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
+GLAPI OSMesaContext GLAPIENTRY
+OSMesaGetCurrentContext( void );
 
 
 
@@ -207,12 +199,13 @@ GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
  *
  * New in version 2.0.
  */
-GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
+GLAPI void GLAPIENTRY
+OSMesaPixelStore( GLint pname, GLint value );
 
 
 
 /*
- * Return context info.  This is like glGetIntegerv.
+ * Return an integer value like glGetIntegerv.
  * Input:  pname -
  *                 OSMESA_WIDTH  return current image width
  *                 OSMESA_HEIGHT  return current image height
@@ -222,7 +215,8 @@ GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
  *                 OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
  *         value - pointer to integer in which to return result.
  */
-GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
+GLAPI void GLAPIENTRY
+OSMesaGetIntegerv( GLint pname, GLint *value );
 
 
 
@@ -236,12 +230,36 @@ GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
  *
  * New in Mesa 2.4.
  */
-GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c,
-                                       GLint *width, GLint *height,
-                                       GLint *bytesPerValue, void **buffer );
+GLAPI GLboolean GLAPIENTRY
+OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
+                      GLint *bytesPerValue, void **buffer );
+
+
+
+/*
+ * Return the color buffer associated with an OSMesa context.
+ * Input:  c - the OSMesa context
+ * Output:  width, height - size of buffer in pixels
+ *          format - buffer format (OSMESA_FORMAT)
+ *          buffer - pointer to depth buffer values
+ * Return:  GL_TRUE or GL_FALSE to indicate success or failure.
+ *
+ * New in Mesa 3.3.
+ */
+GLAPI GLboolean GLAPIENTRY
+OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height,
+                      GLint *format, void **buffer );
 
 
 
+/*
+ * Return pointer to the named function.
+ *
+ * New in Mesa 4.1
+ */
+GLAPI void * GLAPIENTRY
+OSMesaGetProcAddress( const char *funcName );
+
 
 #if defined(__BEOS__) || defined(__QUICKDRAW__)
 #pragma export off