diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-04-04 00:54:23 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-04-04 00:54:23 +0000 |
commit | 941dcc797e1a6317808c1ec43476817286d576ba (patch) | |
tree | 1297979c0ca2ac9a4cb4ccf1f7d2d9d8a67195ae /src/mesa/drivers/osmesa | |
parent | a9c53fa9ee07ac3fdf7cdc01ddaa67f07ab23e26 (diff) |
use BCOPY macro on FreeBSD
Diffstat (limited to 'src/mesa/drivers/osmesa')
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 69e8286c7c..04d5de4731 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.13 2000/03/31 01:07:13 brianp Exp $ */ +/* $Id: osmesa.c,v 1.14 2000/04/04 00:54:23 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -212,6 +212,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist ) indexBits, 8, 8, 8, alphaBits ); if (!osmesa->gl_visual) { + FREE(osmesa); return NULL; } @@ -655,8 +656,13 @@ static GLbitfield clear( GLcontext *ctx, GLbitfield mask, GLboolean all, GLuint i, n, *ptr4; n = osmesa->rowlength * osmesa->height; ptr4 = (GLuint *) osmesa->buffer; - for (i=0;i<n;i++) { - *ptr4++ = osmesa->clearpixel; + if (osmesa->clearpixel) { + for (i=0;i<n;i++) { + *ptr4++ = osmesa->clearpixel; + } + } + else { + BZERO(ptr4, n * sizeof(GLuint)); } } else { |