-/* $Id: buffers.c,v 1.4 2000/04/05 14:40:04 brianp Exp $ */
+/* $Id: buffers.c,v 1.5 2000/04/11 21:26:57 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) _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 );
+ if (newMask & ctx->Color.DrawDestMask) clear_color_buffers(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) _mesa_clear_stencil_buffer(ctx);
}
/* clear software-based alpha buffer(s) */
_mesa_alloc_depth_buffer( ctx );
}
if (ctx->DrawBuffer->UseSoftwareStencilBuffer) {
- gl_alloc_stencil_buffer( ctx );
+ _mesa_alloc_stencil_buffer( ctx );
}
if (ctx->DrawBuffer->UseSoftwareAccumBuffer) {
_mesa_alloc_accum_buffer( ctx );
-/* $Id: stencil.c,v 1.15 2000/04/11 20:42:22 brianp Exp $ */
+/* $Id: stencil.c,v 1.16 2000/04/11 21:26:57 brianp Exp $ */
/*
* Mesa 3-D graphics library
*
*/
static GLboolean
-stencil_and_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
- const GLdepth z[], GLstencil stencil[],
- GLubyte mask[] )
+stencil_and_ztest_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
+ const GLdepth z[], GLstencil stencil[],
+ GLubyte mask[] )
{
ASSERT(ctx->Stencil.Enabled);
ASSERT(n <= PB_SIZE);
*
*/
GLboolean
-gl_stencil_and_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
- const GLdepth z[], GLubyte mask[] )
+_mesa_stencil_and_ztest_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
+ const GLdepth z[], GLubyte mask[] )
{
GLstencil stencilRow[MAX_WIDTH];
GLstencil *stencil;
}
/* do all the stencil/depth testing/updating */
- result = stencil_and_depth_test_span( ctx, n, x, y, z, stencil, mask );
+ result = stencil_and_ztest_span( ctx, n, x, y, z, stencil, mask );
if (ctx->Driver.WriteStencilSpan) {
/* Write updated stencil values into hardware stencil buffer */
* This is used both for software and hardware stencil buffers.
*
* The comments in this function are a bit sparse but the code is
- * almost identical to stencil_and_depth_test_span(), which is well
+ * almost identical to stencil_and_ztest_span(), which is well
* commented.
*
* Input: n - number of pixels in the array
* GL_FALSE - one or more fragments passed the testing
*/
GLboolean
-gl_stencil_and_depth_test_pixels( GLcontext *ctx,
- GLuint n, const GLint x[], const GLint y[],
- const GLdepth z[], GLubyte mask[] )
+_mesa_stencil_and_ztest_pixels( GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLdepth z[], GLubyte mask[] )
{
ASSERT(ctx->Stencil.Enabled);
ASSERT(n <= PB_SIZE);
* Allocate a new stencil buffer. If there's an old one it will be
* deallocated first. The new stencil buffer will be uninitialized.
*/
-void gl_alloc_stencil_buffer( GLcontext *ctx )
+void
+_mesa_alloc_stencil_buffer( GLcontext *ctx )
{
GLuint buffersize = ctx->DrawBuffer->Width * ctx->DrawBuffer->Height;
if (!ctx->DrawBuffer->Stencil) {
/* out of memory */
_mesa_set_enable( ctx, GL_STENCIL_TEST, GL_FALSE );
- gl_error( ctx, GL_OUT_OF_MEMORY, "gl_alloc_stencil_buffer" );
+ gl_error( ctx, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" );
}
}
/*
* Clear the stencil buffer.
*/
-void gl_clear_stencil_buffer( GLcontext *ctx )
+void
+_mesa_clear_stencil_buffer( GLcontext *ctx )
{
if (ctx->Driver.WriteStencilSpan) {
ASSERT(ctx->Driver.ReadStencilSpan);
-/* $Id: stencil.h,v 1.5 2000/04/11 20:42:22 brianp Exp $ */
+/* $Id: stencil.h,v 1.6 2000/04/11 21:26:57 brianp Exp $ */
/*
* Mesa 3-D graphics library
extern GLboolean
-gl_stencil_and_depth_test_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
- const GLdepth z[], GLubyte mask[] );
+_mesa_stencil_and_ztest_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
+ const GLdepth z[], GLubyte mask[] );
-#ifdef VMS /* VMS allows externals of 31 characters maximum */
-#define gl_stencil_and_depth_test_pixels gl_stencil_and_depth_test_pixel
-#endif
extern GLboolean
-gl_stencil_and_depth_test_pixels( GLcontext *ctx, GLuint n,
- const GLint x[], const GLint y[],
- const GLdepth z[], GLubyte mask[] );
-
+_mesa_stencil_and_ztest_pixels( GLcontext *ctx, GLuint n,
+ const GLint x[], const GLint y[],
+ const GLdepth z[], GLubyte mask[] );
extern void
const GLstencil stencil[] );
-extern void gl_alloc_stencil_buffer( GLcontext *ctx );
+extern void
+_mesa_alloc_stencil_buffer( GLcontext *ctx );
-extern void gl_clear_stencil_buffer( GLcontext *ctx );
+extern void
+_mesa_clear_stencil_buffer( GLcontext *ctx );
#endif