-/* $Id: buffers.c,v 1.2 2000/02/02 21:52:26 brianp Exp $ */
+/* $Id: buffers.c,v 1.3 2000/02/02 22:16:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
/* do software clearing here */
if (newMask) {
if (newMask & ctx->Color.DrawDestMask) clear_color_buffers( ctx );
- if (newMask & GL_DEPTH_BUFFER_BIT) gl_clear_depth_buffer( ctx );
+ if (newMask & GL_DEPTH_BUFFER_BIT) _mesa_clear_depth_buffer( ctx );
if (newMask & GL_ACCUM_BUFFER_BIT) _mesa_clear_accum_buffer( ctx );
if (newMask & GL_STENCIL_BUFFER_BIT) gl_clear_stencil_buffer( ctx );
}
/* Reallocate other buffers if needed. */
if (ctx->DrawBuffer->UseSoftwareDepthBuffer) {
- gl_alloc_depth_buffer( ctx );
+ _mesa_alloc_depth_buffer( ctx );
}
if (ctx->DrawBuffer->UseSoftwareStencilBuffer) {
gl_alloc_stencil_buffer( ctx );
-/* $Id: depth.c,v 1.11 1999/12/10 19:09:22 brianp Exp $ */
+/* $Id: depth.c,v 1.12 2000/02/02 22:16:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Apply depth test to span of fragments. Hardware or software z buffer.
*/
GLuint
-gl_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
- const GLdepth z[], GLubyte mask[] )
+_mesa_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
+ const GLdepth z[], GLubyte mask[] )
{
GLdepth zbuffer[MAX_WIDTH];
GLdepth *zptr;
-void gl_depth_test_pixels( GLcontext *ctx,
- GLuint n, const GLint x[], const GLint y[],
- const GLdepth z[], GLubyte mask[] )
+void
+_mesa_depth_test_pixels( GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLdepth z[], GLubyte mask[] )
{
if (ctx->Driver.ReadDepthPixels) {
/* read depth values from hardware Z buffer */
* x,y - location of first pixel
* Output: depth - the array of depth values
*/
-void gl_read_depth_span_float( GLcontext* ctx,
- GLuint n, GLint x, GLint y, GLfloat depth[] )
+void
+_mesa_read_depth_span_float( GLcontext* ctx,
+ GLuint n, GLint x, GLint y, GLfloat depth[] )
{
const GLfloat scale = 1.0F / DEPTH_SCALE;
* it will be free()'d. The new depth buffer will be uniniitalized.
* This function is only called through Driver.alloc_depth_buffer.
*/
-void gl_alloc_depth_buffer( GLcontext* ctx )
+void
+_mesa_alloc_depth_buffer( GLcontext* ctx )
{
/* deallocate current depth buffer if present */
if (ctx->DrawBuffer->UseSoftwareDepthBuffer) {
* allocate it now.
* This function is only called through Driver.clear_depth_buffer.
*/
-void gl_clear_depth_buffer( GLcontext* ctx )
+void
+_mesa_clear_depth_buffer( GLcontext* ctx )
{
GLdepth clear_value = (GLdepth) (ctx->Depth.Clear * DEPTH_SCALE);
-/* $Id: depth.h,v 1.5 1999/12/10 19:09:22 brianp Exp $ */
+/* $Id: depth.h,v 1.6 2000/02/02 22:16:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
extern GLuint
-gl_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
- const GLdepth z[], GLubyte mask[] );
+_mesa_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
+ const GLdepth z[], GLubyte mask[] );
extern void
-gl_depth_test_pixels( GLcontext *ctx,
- GLuint n, const GLint x[], const GLint y[],
- const GLdepth z[], GLubyte mask[] );
+_mesa_depth_test_pixels( GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLdepth z[], GLubyte mask[] );
extern void
-gl_read_depth_span_float( GLcontext *ctx, GLuint n, GLint x, GLint y,
- GLfloat depth[] );
+_mesa_read_depth_span_float( GLcontext *ctx, GLuint n, GLint x, GLint y,
+ GLfloat depth[] );
extern void
-gl_alloc_depth_buffer( GLcontext* ctx );
+_mesa_alloc_depth_buffer( GLcontext* ctx );
extern void
-gl_clear_depth_buffer( GLcontext* ctx );
+_mesa_clear_depth_buffer( GLcontext* ctx );
-/* $Id: stencil.c,v 1.13 1999/12/10 19:09:22 brianp Exp $ */
+/* $Id: stencil.c,v 1.14 2000/02/02 22:16:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
*
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2000 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"),
MEMCPY(oldmask, mask, n * sizeof(GLubyte));
/* apply the depth test */
- gl_depth_test_span(ctx, n, x, y, z, mask);
+ _mesa_depth_test_span(ctx, n, x, y, z, mask);
/* Set the stencil pass/fail flags according to result of depth testing.
* if oldmask[i] == 0 then
MEMCPY(oldmask, mask, n * sizeof(GLubyte));
- gl_depth_test_pixels(ctx, n, x, y, z, mask);
+ _mesa_depth_test_pixels(ctx, n, x, y, z, mask);
for (i=0;i<n;i++) {
ASSERT(mask[i] == 0 || mask[i] == 1);
MEMCPY(oldmask, mask, n * sizeof(GLubyte));
- gl_depth_test_pixels(ctx, n, x, y, z, mask);
+ _mesa_depth_test_pixels(ctx, n, x, y, z, mask);
for (i=0;i<n;i++) {
ASSERT(mask[i] == 0 || mask[i] == 1);