-/* $Id: fakeglx.c,v 1.50 2001/05/24 19:06:21 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.51 2001/05/24 20:05:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
/* Now make current! */
if (XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer)) {
- ctx->currentDpy = dpy;
- ctx->currentDrawable = draw;
- ctx->currentReadable = read;
+ ((__GLXcontext *) ctx)->currentDpy = dpy;
+ ((__GLXcontext *) ctx)->currentDrawable = draw;
+ ((__GLXcontext *) ctx)->currentReadable = read;
#ifdef GLX_BUILD_IN_XLIB_MESA
__glXSetCurrentContext(ctx);
#endif
-/* $Id: glxapi.c,v 1.22 2001/05/24 19:06:21 brianp Exp $ */
+/* $Id: glxapi.c,v 1.23 2001/05/24 20:05:32 brianp Exp $ */
/*
* Mesa 3-D graphics library
GLXDrawable glXGetCurrentDrawable(void)
{
- GLXContext gc = glXGetCurrentContext();
+ __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
return gc ? gc->currentDrawable : 0;
}
Display *glXGetCurrentDisplay(void)
{
/* Same code as in libGL's glxext.c */
- GLXContext gc = __glXGetCurrentContext();
+ __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
if (NULL == gc) return NULL;
return gc->currentDpy;
}
GLXDrawable glXGetCurrentReadDrawable(void)
{
- GLXContext gc = glXGetCurrentContext();
+ __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
return gc ? gc->currentReadable : 0;
}
/* stand-alone Mesa */
GLXContextID glXGetContextIDEXT(const GLXContext context)
{
- return context->xid;
+ return ((__GLXcontext *) context)->xid;
}
#endif