-/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.22 2003/12/08 17:35:28 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
if ( do_delete && (m->visualID != 0) ) {
do_delete = GL_FALSE;
- fprintf(stderr, "libGL warning: 3D driver claims to not support "
- "visual 0x%02x\n", m->visualID);
+ if (getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "libGL warning: 3D driver claims to not support "
+ "visual 0x%02x\n", m->visualID);
+ }
}
if ( do_delete ) {
__glXUnlock();
return 0;
}
- dpyPriv = (__GLXdisplayPrivate *) Xmalloc(sizeof(__GLXdisplayPrivate));
+ dpyPriv = (__GLXdisplayPrivate *) Xcalloc(1, sizeof(__GLXdisplayPrivate));
if (!dpyPriv) {
__glXUnlock();
Xfree((char*) private);
** Note: This _must_ be done before calling any other DRI routines
** (e.g., those called in AllocAndFetchScreenConfigs).
*/
- if (getenv("LIBGL_ALWAYS_INDIRECT")) {
- /* Assinging zero here assures we'll never go direct */
- dpyPriv->driDisplay.private = 0;
- dpyPriv->driDisplay.destroyDisplay = 0;
- }
- else {
+ if (getenv("LIBGL_ALWAYS_INDIRECT") == NULL) {
dpyPriv->driDisplay.private =
driCreateDisplay(dpy, &dpyPriv->driDisplay);
}
/************************************************************************/
-GLXContext glXGetCurrentContext(void)
+PUBLIC GLXContext glXGetCurrentContext(void)
{
GLXContext cx = __glXGetCurrentContext();
}
}
-GLXDrawable glXGetCurrentDrawable(void)
+PUBLIC GLXDrawable glXGetCurrentDrawable(void)
{
GLXContext gc = __glXGetCurrentContext();
return gc->currentDrawable;