python: Surface clears.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 14 Jul 2008 02:44:21 +0000 (11:44 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 14 Jul 2008 03:41:07 +0000 (12:41 +0900)
src/gallium/state_trackers/python/gallium.i
src/gallium/state_trackers/python/samples/simple.py

index 6e355b79757b2774bbbfb59f881a23fe7a221b47..f616037ec2f13a042c15e5281bfaf5bc135ce2dd 100644 (file)
@@ -367,7 +367,7 @@ error1:
       $self->pipe->surface_fill($self->pipe, dst, x, y, width, height, value);
    }
 
-   void clear(struct pipe_surface *surface, unsigned value) {
+   void surface_clear(struct pipe_surface *surface, unsigned value = 0) {
       $self->pipe->clear($self->pipe, surface, value);
    }
 
index 6e90eec28ae0a25014946c562de4418ac0638fec..10742db0dc0faac9c859d914aed939baca78ad11 100644 (file)
@@ -142,6 +142,8 @@ def test(dev):
     #fs.dump()
     ctx.set_fragment_shader(fs)
 
+    ctx.surface_clear(surface, 0x00ff0000)
+
     if 0:
         nverts = 4
         nattrs = 1