dri: Add DRI entrypoints to create a context for a given API
[mesa.git] / src / mesa / drivers / dri / r128 / r128_context.h
index 3f7416e9cc9d28dcdfc10076eea3fbaac0536eb4..65ddb3bd23bcff540afb4a68c966f1d0d43d02bb 100644 (file)
@@ -1,4 +1,3 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.12 2002/12/16 16:18:52 dawes Exp $ */
 /**************************************************************************
 
 Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
@@ -40,7 +39,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "drm.h"
 #include "r128_drm.h"
 
-#include "mtypes.h"
+#include "main/mtypes.h"
 #include "tnl/t_vertex.h"
 
 #include "r128_reg.h"
@@ -138,9 +137,9 @@ struct r128_context {
    GLfloat hw_viewport[16];
    GLfloat depth_scale;
 
-   u_int32_t ClearColor;                       /* Color used to clear color buffer */
-   u_int32_t ClearDepth;                       /* Value used to clear depth buffer */
-   u_int32_t ClearStencil;             /* Value used to clear stencil */
+   uint32_t ClearColor;                        /* Color used to clear color buffer */
+   uint32_t ClearDepth;                        /* Value used to clear depth buffer */
+   uint32_t ClearStencil;              /* Value used to clear stencil */
 
    /* Map GL texture units onto hardware
     */
@@ -187,9 +186,9 @@ struct r128_context {
 
    /* Mirrors of some DRI state
     */
-   __DRIcontextPrivate *driContext;    /* DRI context */
-   __DRIscreenPrivate  *driScreen;     /* DRI screen */
-   __DRIdrawablePrivate        *driDrawable;   /* DRI drawable bound to this ctx */
+   __DRIcontext        *driContext;    /* DRI context */
+   __DRIscreen *driScreen;     /* DRI screen */
+   __DRIdrawable       *driDrawable;   /* DRI drawable bound to this ctx */
 
    unsigned int lastStamp;             /* mirror driDrawable->lastStamp */
 
@@ -225,17 +224,18 @@ struct r128_context {
                (rmesa->r128Screen->chipset == R128_CARD_TYPE_R128_MOBILITY)
 
 
-extern GLboolean r128CreateContext( const __GLcontextModes *glVisual,
-                                   __DRIcontextPrivate *driContextPriv,
+extern GLboolean r128CreateContext( gl_api api,
+                                   const __GLcontextModes *glVisual,
+                                   __DRIcontext *driContextPriv,
                                     void *sharedContextPrivate );
 
-extern void r128DestroyContext( __DRIcontextPrivate * );
+extern void r128DestroyContext( __DRIcontext * );
 
-extern GLboolean r128MakeCurrent( __DRIcontextPrivate *driContextPriv,
-                                  __DRIdrawablePrivate *driDrawPriv,
-                                  __DRIdrawablePrivate *driReadPriv );
+extern GLboolean r128MakeCurrent( __DRIcontext *driContextPriv,
+                                  __DRIdrawable *driDrawPriv,
+                                  __DRIdrawable *driReadPriv );
 
-extern GLboolean r128UnbindContext( __DRIcontextPrivate *driContextPriv );
+extern GLboolean r128UnbindContext( __DRIcontext *driContextPriv );
 
 /* ================================================================
  * Debugging: