Commit e32b1543 authored by Brian Paul's avatar Brian Paul
Browse files

fixed bytesPerValue bug in OSMesaGetDepthBuffer()

parent 5a7d5d08
/* $Id: osmesa.c,v 1.19.4.3 2001/01/06 22:43:01 gareth Exp $ */ /* $Id: osmesa.c,v 1.19.4.4 2001/02/08 23:51:27 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
...@@ -490,7 +490,10 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, ...@@ -490,7 +490,10 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
else { else {
*width = c->gl_buffer->Width; *width = c->gl_buffer->Width;
*height = c->gl_buffer->Height; *height = c->gl_buffer->Height;
*bytesPerValue = sizeof(GLdepth); if (c->gl_visual->DepthBits <= 16)
*bytesPerValue = sizeof(GLushort);
else
*bytesPerValue = sizeof(GLuint);
*buffer = c->gl_buffer->DepthBuffer; *buffer = c->gl_buffer->DepthBuffer;
return GL_TRUE; return GL_TRUE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment