config = glx_config_find_visual(psc->visuals, vis->visualid);
if (config == NULL) {
- xError error;
-
- error.errorCode = BadValue;
- error.resourceID = vis->visualid;
- error.sequenceNumber = dpy->request;
- error.type = X_Error;
- error.majorCode = __glXSetupForCommand(dpy);
- error.minorCode = X_GLXCreateContext;
- _XError(dpy, &error);
+ __glXSendError(dpy, BadValue, vis->visualid, X_GLXCreateContext, True);
return None;
}
#include <pthread.h>
#include "glxclient.h"
-
#include "glapi.h"
+#include "glx_error.h"
/*
** We setup some dummy structures here so that the API can be used
return gc->currentDrawable;
}
-static void
-__glXGenerateError(Display * dpy, XID resource,
- BYTE errorCode, CARD16 minorCode)
-{
- xError error;
-
- error.errorCode = errorCode;
- error.resourceID = resource;
- error.sequenceNumber = dpy->request;
- error.type = X_Error;
- error.majorCode = __glXSetupForCommand(dpy);
- error.minorCode = minorCode;
- _XError(dpy, &error);
-}
-
/**
* Make a particular context current.
*
if (gc->vtable->bind(gc, oldGC, draw, read) != Success) {
__glXSetCurrentContextNull();
__glXUnlock();
- __glXGenerateError(dpy, None, GLXBadContext, X_GLXMakeContextCurrent);
+ __glXSendError(dpy, GLXBadContext, None, X_GLXMakeContextCurrent,
+ False);
return GL_FALSE;
}