{
XMesaBuffer b;
- ASSERT(type == WINDOW || type == PIXMAP || type == PBUFFER);
+ assert(type == WINDOW || type == PIXMAP || type == PBUFFER);
b = (XMesaBuffer) CALLOC_STRUCT(xmesa_buffer);
if (!b)
const int xclass = v->visualType;
- ASSERT(!b || b->xm_visual == v);
+ assert(!b || b->xm_visual == v);
/* Save true bits/pixel */
v->BitsPerPixel = bits_per_pixel(v);
}
v->mesa_visual.indexBits = 0;
- if (_mesa_getenv("MESA_NO_DITHER")) {
+ if (getenv("MESA_NO_DITHER")) {
v->dithered_pf = v->undithered_pf;
}
* which can help Brian figure out what's going on when a user
* reports bugs.
*/
- if (_mesa_getenv("MESA_INFO")) {
+ if (getenv("MESA_INFO")) {
printf("X/Mesa visual = %p\n", (void *) v);
printf("X/Mesa dithered pf = %u\n", v->dithered_pf);
printf("X/Mesa undithered pf = %u\n", v->undithered_pf);
/* Do window-specific initializations */
/* these should have been set in create_xmesa_buffer */
- ASSERT(b->frontxrb->drawable == window);
- ASSERT(b->frontxrb->pixmap == (XMesaPixmap) window);
+ assert(b->frontxrb->drawable == window);
+ assert(b->frontxrb->pixmap == (XMesaPixmap) window);
/* Setup for single/double buffering */
if (v->mesa_visual.doubleBufferMode) {
GLint red_bits, green_bits, blue_bits, alpha_bits;
/* For debugging only */
- if (_mesa_getenv("MESA_XSYNC")) {
+ if (getenv("MESA_XSYNC")) {
/* This makes debugging X easier.
* In your debugger, set a breakpoint on _XError to stop when an
* X protocol error is generated.
* the struct but we may need some of the information contained in it
* at a later time.
*/
- v->visinfo = (XVisualInfo *) malloc(sizeof(*visinfo));
+ v->visinfo = malloc(sizeof(*visinfo));
if(!v->visinfo) {
free(v);
return NULL;
memcpy(v->visinfo, visinfo, sizeof(*visinfo));
/* check for MESA_GAMMA environment variable */
- gamma = _mesa_getenv("MESA_GAMMA");
+ gamma = getenv("MESA_GAMMA");
if (gamma) {
v->RedGamma = v->GreenGamma = v->BlueGamma = 0.0;
sscanf( gamma, "%f %f %f", &v->RedGamma, &v->GreenGamma, &v->BlueGamma );
accum_red_size, accum_green_size,
accum_blue_size, accum_alpha_size,
0)) {
- FREE(v);
+ free(v);
return NULL;
}