Mimic the changes of the glx server interfaces in the wrapper functions

so that we can get the benefit of compiler type checking.
This commit is contained in:
José Fonseca 2007-09-20 23:21:32 +01:00
parent 8231b546d3
commit a2cf360909
3 changed files with 16 additions and 13 deletions

View file

@ -52,6 +52,8 @@
#define XGL_TEXTURE_RECTANGLE_BIT (1 << 3)
#define XGL_TEXTURE_CUBE_MAP_BIT (1 << 4)
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
extern __GLXprovider *__xglMesaProvider;
typedef struct _xglGLScreen {
@ -5548,7 +5550,7 @@ xglCreateDrawable (__GLXscreen *screen,
memset (pBufferPriv, 0, sizeof (xglGLBufferRec));
if (!GlxDrawableInit (&pBufferPriv->base, screen, pDrawable, drawId, modes))
if (!__glXDrawableInit (&pBufferPriv->base, screen, pDrawable, drawId, modes))
{
xfree (pBufferPriv);
return NULL;
@ -5844,7 +5846,7 @@ xglLoseCurrent (__GLXcontext *context)
xglGLContextPtr pContext = (xglGLContextPtr) context;
__GLXcontext *mesaContext = pContext->mesaContext;
GlxFlushContextCache ();
__glXFlushContextCache ();
GlxSetRenderTables (0);
if (!mesaContext)
@ -6133,7 +6135,7 @@ xglLoseCurrentContext (void *closure)
before switching context */
glFinish ();
GlxFlushContextCache ();
__glXFlushContextCache ();
GlxSetRenderTables (0);
}
}

View file

@ -88,7 +88,7 @@ GlxInitVisuals (VisualPtr *visualp,
}
void
GlxFlushContextCache (void)
__glXFlushContextCache (void)
{
if (glXHandle)
(*__xglGLXFunc.flushContextCache) ();
@ -109,7 +109,7 @@ GlxPushProvider (__GLXprovider *provider)
}
void
GlxScreenInit (__GLXscreen *screen,
__glXScreenInit (__GLXscreen *screen,
ScreenPtr pScreen)
{
if (glXHandle)
@ -117,21 +117,21 @@ GlxScreenInit (__GLXscreen *screen,
}
void
GlxScreenDestroy (__GLXscreen *screen)
__glXScreenDestroy (__GLXscreen *screen)
{
if (glXHandle)
(*__xglGLXFunc.screenDestroy) (screen);
}
GLboolean
GlxDrawableInit (__GLXdrawable *drawable,
__GLXcontext *ctx,
DrawablePtr pDrawable,
XID drawId,
__GLcontextModes *modes)
__glXDrawableInit (__GLXdrawable *drawable,
__GLXscreen *screen,
DrawablePtr pDrawable,
XID drawId,
__GLcontextModes *modes)
{
if (glXHandle)
return (*__xglGLXFunc.drawableInit) (drawable, ctx, pDrawable, drawId, modes);
return (*__xglGLXFunc.drawableInit) (drawable, screen, pDrawable, drawId, modes);
return GL_FALSE;
}

View file

@ -29,6 +29,7 @@
#include "glxserver.h"
#include "glxscreens.h"
#include "glxutil.h"
#include "glxext.h"
#include "glapitable.h"
@ -53,7 +54,7 @@ typedef struct _xglGLXFunc {
void (*screenInit) (__GLXscreen *screen, ScreenPtr pScreen);
void (*screenDestroy) (__GLXscreen *screen);
GLboolean (*drawableInit) (__GLXdrawable *drawable,
__GLXcontext *ctx,
__GLXscreen *screen,
DrawablePtr pDrawable,
XID drawId,
__GLcontextModes *modes);