mesa: Eliminate parameters to dd_function_table::Viewport
[mesa.git] / src / mesa / drivers / x11 / glxapi.h
index d9b8fb236bfe6e5c2bcf9eb235340ada2f8df12d..67a76afdfc824bd5c2d5b858aea14c8d001acd37 100644 (file)
@@ -1,10 +1,7 @@
-/* $Id: glxapi.h,v 1.10 2001/05/25 21:51:02 brianp Exp $ */
-
 /*
  * Mesa 3-D graphics library
- * Version:  3.5
  * 
- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2004  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"),
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  */
 
 
 #include "GL/glx.h"
 
 
-#ifdef GLX_BUILD_IN_XLIB_MESA
-/* The GLX API dispatcher is being built into XFree86's libGL */
-#include "glxclient.h"
-#else
-/* The GLX API dispatcher is being built into stand-alone Mesa */
+/* The GLX API dispatcher (i.e. this code) is being built into stand-alone
+ * Mesa.  We don't know anything about XFree86 or real GLX so we define a
+ * minimal __GLXContextRec here so some of the functions in this file can
+ * work properly.
+ */
 typedef struct __GLXcontextRec {
    Display *currentDpy;
    GLboolean isDirect;
@@ -45,7 +43,6 @@ typedef struct __GLXcontextRec {
    GLXDrawable currentReadable;
    XID xid;
 } __GLXcontext;
-#endif
 
 
 /*
@@ -57,8 +54,10 @@ typedef struct __GLXcontextRec {
  * pseudo-GLX can be present at the same time.  The former being used on
  * GLX-enabled X servers and the later on non-GLX X servers.
  *
- * XXX Note that this hasn't actually been fully used yet in either Mesa or
- * the DRI.  Red Hat, however, has used it for their custom libGL.
+ * Red Hat has been using this since Red Hat Linux 7.0 (I think).
+ * This'll be a standard feature in XFree86 4.3.  It basically allows one
+ * libGL to do both DRI-rendering and "fake GLX" rendering to X displays
+ * that lack the GLX extension.
  */
 struct _glxapi_table {
    /*** GLX_VERSION_1_0 ***/
@@ -188,6 +187,20 @@ struct _glxapi_table {
    /*** GLX_MESA_set_3dfx_mode ***/
    Bool (*Set3DfxModeMESA)(int mode);
 
+   /*** GLX_NV_vertex_array_range ***/
+   void * (*AllocateMemoryNV)( GLsizei size,
+                               GLfloat readFrequency,
+                               GLfloat writeFrequency,
+                               GLfloat priority );
+   void (*FreeMemoryNV)( GLvoid *pointer );
+
+   /*** GLX_MESA_agp_offset ***/
+   GLuint (*GetAGPOffsetMESA)( const GLvoid *pointer );
+
+   /*** GLX_EXT_texture_from_pixmap ***/
+   void (*BindTexImageEXT)(Display *dpy, GLXDrawable drawable, int buffer,
+                           const int *attrib_list);
+   void (*ReleaseTexImageEXT)(Display *dpy, GLXDrawable drawable, int buffer);
 };
 
 
@@ -208,7 +221,7 @@ extern void
 _glxapi_set_no_op_table(struct _glxapi_table *t);
 
 
-extern const GLvoid *
+extern __GLXextFuncPtr
 _glxapi_get_proc_address(const char *funcName);