#include "s3v_context.h"
#include "s3v_vb.h"
-#include "context.h"
-#include "matrix.h"
#include "s3v_dri.h"
-#include "framebuffer.h"
-#include "renderbuffer.h"
+#include "main/context.h"
+#include "main/matrix.h"
+#include "main/framebuffer.h"
+#include "main/renderbuffer.h"
+#include "main/viewport.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
/* #define DEBUG(str) printf str */
-static GLboolean
-s3vInitDriver(__DRIscreenPrivate *sPriv)
+static const __DRIconfig **
+s3vInitScreen(__DRIscreen *sPriv)
{
sPriv->private = (void *) s3vCreateScreen( sPriv );
return GL_FALSE;
}
- return GL_TRUE;
+ return NULL;
}
static void
static void
s3vDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
{
- _mesa_unreference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)));
+ _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
return GL_TRUE;
}
-
-static struct __DriverAPIRec s3vAPI = {
- s3vInitDriver,
- s3vDestroyScreen,
- s3vCreateContext,
- s3vDestroyContext,
- s3vCreateBuffer,
- s3vDestroyBuffer,
- s3vSwapBuffers,
- s3vMakeCurrent,
- s3vUnbindContext,
+const struct __DriverAPIRec driDriverAPI = {
+ .InitScreen = s3vInitScreen,
+ .DestroyScreen = s3vDestroyScreen,
+ .CreateContext = s3vCreateContext,
+ .DestroyContext = s3vDestroyContext,
+ .CreateBuffer = s3vCreateBuffer,
+ .DestroyBuffer = s3vDestroyBuffer,
+ .SwapBuffers = s3vSwapBuffers,
+ .MakeCurrent = s3vMakeCurrent,
+ .UnbindContext = s3vUnbindContext,
};
-
-
-#if 0
-/*
- * This is the bootstrap function for the driver.
- * The __driCreateScreen name is the symbol that libGL.so fetches.
- * Return: pointer to a __DRIscreenPrivate.
- */
-void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
- int numConfigs, __GLXvisualConfig *config)
-{
- __DRIscreenPrivate *psp=NULL;
-
- DEBUG(("__driCreateScreen: psp = %p\n", psp));
- psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &s3vAPI);
- DEBUG(("__driCreateScreen: psp = %p\n", psp));
- return (void *) psp;
-}
-#endif