core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

s_depth.h File Reference

#include "s_context.h"

Functions

GLuint _swrast_depth_test_span (GLcontext *ctx, SWspan *span)
 Apply depth (Z) buffer testing to the span.
void _swrast_depth_clamp_span (GLcontext *ctx, SWspan *span)
GLboolean _swrast_depth_bounds_test (GLcontext *ctx, SWspan *span)
 GL_EXT_depth_bounds_test extension.
void _swrast_read_depth_span_float (GLcontext *ctx, struct gl_renderbuffer *rb, GLint n, GLint x, GLint y, GLfloat depth[])
 Read a span of depth values from the given depth renderbuffer, returning the values as GLfloats.
void _swrast_read_depth_span_uint (GLcontext *ctx, struct gl_renderbuffer *rb, GLint n, GLint x, GLint y, GLuint depth[])
 As above, but return 32-bit GLuint values.
void _swrast_clear_depth_buffer (GLcontext *ctx, struct gl_renderbuffer *rb)
 Clear the given z/depth renderbuffer.


Function Documentation

void _swrast_clear_depth_buffer ( GLcontext ctx,
struct gl_renderbuffer rb 
)

Clear the given z/depth renderbuffer.

GLboolean _swrast_depth_bounds_test ( GLcontext ctx,
SWspan span 
)

GL_EXT_depth_bounds_test extension.

Discard fragments depending on whether the corresponding Z-buffer values are outside the depth bounds test range. Note: we test the Z buffer values, not the fragment Z values!

Returns:
GL_TRUE if any fragments pass, GL_FALSE if no fragments pass

void _swrast_depth_clamp_span ( GLcontext ctx,
SWspan span 
)

GLuint _swrast_depth_test_span ( GLcontext ctx,
SWspan span 
)

Apply depth (Z) buffer testing to the span.

Returns:
approx number of pixels that passed (only zero is reliable)

void _swrast_read_depth_span_float ( GLcontext ctx,
struct gl_renderbuffer rb,
GLint  n,
GLint  x,
GLint  y,
GLfloat  depth[] 
)

Read a span of depth values from the given depth renderbuffer, returning the values as GLfloats.

This function does clipping to prevent reading outside the depth buffer's bounds. Though the clipping is redundant when we're called from _swrast_ReadPixels.

void _swrast_read_depth_span_uint ( GLcontext ctx,
struct gl_renderbuffer rb,
GLint  n,
GLint  x,
GLint  y,
GLuint  depth[] 
)

As above, but return 32-bit GLuint values.


Generated on Sun Sep 27 06:48:05 2009 for Mesa Software Rasterization (swrast) by  doxygen 1.5.4