diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-02-18 14:48:40 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-02-18 14:48:40 +0000 |
commit | d87f2cedb620e2cdf41b6523d96cd8a23b2700f0 (patch) | |
tree | 28cc82f5831d7e53e9c8c1fe05db3aa20789570a | |
parent | efa71786b0bd981ed977c9ec811cbf4f73e55da3 (diff) |
XMesaGetDepthBuffer() returned wrong bytesPerValue (Karl Schultz)
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 4a8a92a0c8..1249ba9b2d 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.2.2 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1667,7 +1667,6 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) _mesa_enable_1_3_extensions(mesaCtx); _mesa_enable_1_4_extensions(mesaCtx); _mesa_enable_1_5_extensions(mesaCtx); - _mesa_enable_2_0_extensions(mesaCtx); /* finish up xmesa context initializations */ c->swapbytes = CHECK_BYTE_ORDER(v) ? GL_FALSE : GL_TRUE; @@ -2519,7 +2518,8 @@ GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height, else { *width = b->mesa_buffer.Width; *height = b->mesa_buffer.Height; - *bytesPerValue = sizeof(GLdepth); + *bytesPerValue = b->mesa_buffer.Visual.depthBits <= 16 + ? sizeof(GLushort) : sizeof(GLuint); *buffer = b->mesa_buffer.DepthBuffer; return GL_TRUE; } |