-/* $Id: depth.c,v 1.13 2000/03/03 17:47:39 brianp Exp $ */
+/* $Id: depth.c,v 1.15 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
if (ctx->DrawBuffer->UseSoftwareDepthBuffer) {
GLint bytesPerValue;
- if (ctx->DrawBuffer->Depth) {
- FREE(ctx->DrawBuffer->Depth);
+ if (ctx->DrawBuffer->DepthBuffer) {
+ FREE(ctx->DrawBuffer->DepthBuffer);
ctx->DrawBuffer->DepthBuffer = NULL;
- ctx->DrawBuffer->Depth = NULL;
}
/* allocate new depth buffer, but don't initialize it */
ctx->DrawBuffer->DepthBuffer = MALLOC( ctx->DrawBuffer->Width
* ctx->DrawBuffer->Height
* bytesPerValue );
- ctx->DrawBuffer->Depth = (GLdepth *) ctx->DrawBuffer->DepthBuffer;
- if (!ctx->DrawBuffer->Depth) {
+ if (!ctx->DrawBuffer->DepthBuffer) {
/* out of memory */
ctx->Depth.Test = GL_FALSE;
ctx->NewState |= NEW_RASTER_OPS;
2 * ctx->DrawBuffer->Width * ctx->DrawBuffer->Height);
}
else {
- GLushort *d = ctx->DrawBuffer->DepthBuffer;
+ GLushort *d = (GLushort *) ctx->DrawBuffer->DepthBuffer;
GLint n = ctx->DrawBuffer->Width * ctx->DrawBuffer->Height;
while (n >= 16) {
d[0] = clearValue; d[1] = clearValue;