added SetStencil/DepthPointer functions
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 3 Sep 2005 16:41:30 +0000 (16:41 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 3 Sep 2005 16:41:30 +0000 (16:41 +0000)
src/mesa/drivers/dri/common/depthtmp.h
src/mesa/drivers/dri/common/stenciltmp.h

index 1875d157b4c36cdd79268c31e7c4275f17675c94..55199abf6a3f4e317df88c4110b5891774100af2 100644 (file)
@@ -241,6 +241,22 @@ static void TAG(ReadDepthPixels)( GLcontext *ctx,
 }
 
 
+/**
+ * Initialize the given renderbuffer's span routines to point to
+ * the depth/z functions we generated above.
+ */
+static void TAG(InitDepthPointers)(struct gl_renderbuffer *rb)
+{
+   rb->GetRow = TAG(ReadDepthSpan);
+   rb->GetValues = TAG(ReadDepthPixels);
+   rb->PutRow = TAG(WriteDepthSpan);
+   rb->PutRowRGB = NULL;
+   rb->PutMonoRow = TAG(WriteMonoDepthSpan);
+   rb->PutValues = TAG(WriteDepthPixels);
+   rb->PutMonoValues = NULL;
+}
+
+
 #if HAVE_HW_DEPTH_SPANS
 #undef WRITE_DEPTH_SPAN
 #undef WRITE_DEPTH_PIXELS
index dccab0660d4599bbfb4e5d575bdb63f72cb58656..e279b5b5c031bdb541e7d09d46d42115f6e12ae1 100644 (file)
@@ -176,6 +176,21 @@ static void TAG(ReadStencilPixels)( GLcontext *ctx,
 
 
 
+/**
+ * Initialize the given renderbuffer's span routines to point to
+ * the stencil functions we generated above.
+ */
+static void TAG(InitStencilPointers)(struct gl_renderbuffer *rb)
+{
+   rb->GetRow = TAG(ReadStencilSpan);
+   rb->GetValues = TAG(ReadStencilPixels);
+   rb->PutRow = TAG(WriteStencilSpan);
+   rb->PutRowRGB = NULL;
+   rb->PutMonoRow = TAG(WriteMonoStencilSpan);
+   rb->PutValues = TAG(WriteStencilPixels);
+   rb->PutMonoValues = NULL;
+}
+
 
 #undef WRITE_STENCIL
 #undef READ_STENCIL