/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.4
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
#include "xfonts.h"
#include "xmesaP.h"
+#ifdef __VMS
+#define _mesa_sprintf sprintf
+#endif
/* This indicates the client-side GLX API and GLX encoder version. */
#define CLIENT_MAJOR_VERSION 1
* FBConfig attribs.
*/
case GLX_RENDER_TYPE:
+ if (!fbConfig)
+ return NULL;
parselist++;
if (*parselist == GLX_RGBA_BIT) {
rgb_flag = GL_TRUE;
parselist++;
break;
case GLX_DRAWABLE_TYPE:
+ if (!fbConfig)
+ return NULL;
parselist++;
if (*parselist & ~(GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT)) {
return NULL; /* bad bit */
parselist++;
break;
case GLX_FBCONFIG_ID:
+ if (!fbConfig)
+ return NULL;
parselist++;
- desiredVisualID = *parselist;
+ desiredVisualID = *parselist++;
+ break;
+ case GLX_X_RENDERABLE:
+ if (!fbConfig)
+ return NULL;
+ parselist += 2;
+ /* ignore */
break;
case None:
if (XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer)) {
((__GLXcontext *) ctx)->currentDpy = dpy;
((__GLXcontext *) ctx)->currentDrawable = draw;
-#ifndef GLX_BUILT_IN_XMESA
((__GLXcontext *) ctx)->currentReadable = read;
-#else
- __glXSetCurrentContext(ctx);
-#endif
return True;
}
else {
MakeCurrent_PrevReadable = 0;
MakeCurrent_PrevDrawBuffer = 0;
MakeCurrent_PrevReadBuffer = 0;
-#ifdef GLX_BUILT_IN_XMESA
- /* XXX bind dummy context with __glXSetCurrentContext(ctx); */
-#endif
return True;
}
else {