On 18-Nov-99 [EMAIL PROTECTED] wrote:
> There is a bug with "DrawArrays":
> 
> When an application first uses DrawArrays and then switch to DrawElements
> or Begin/ArrayElement/End nothing is drawn for some frames - may be until
> the VB overflows...?
> 
> I have attached a small test program:
> 
> It starts with "DrawArrays". Hit ´1´ to switch to DrawElements, nothing is 
> drawn for 1 frame (hit arrow keys for next frame). Now switch back to
> "DrawArrays" with ´0´, and switch to "ArrayElement" with ´2´: nothing is
> drawn for a couple of frames...

I recompiled with "MESA_VERBOSE = VERBOSE_IMMEDIATE" which gave me some
interesting info.

Following patch fixes the "nothing drawn" bug, but I don't know if it is
the right way to fix it...

--- varray.c.orig       Thu Nov 18 14:11:12 1999
+++ varray.c    Thu Nov 18 14:11:26 1999
@@ -669,6 +669,7 @@
          /* Transform and render.
          */
          gl_run_pipeline( VB );
+        gl_flush_vb( ctx, "DrawArrays" );
         gl_reset_vb( VB );
 
         ctx->Array.Flag[count] = ctx->Array.Flags;

----------------------------------------------------------

However, "DrawArrays" is broken anyway. It doesn't use the Z-values
from the vertex array on startup. When you switch to eg. DrawElements 
and then back to DrawArrays it's ok, but just start my testprogram
(previous mail), and the plane is centered at z=0... should be at z=1. 
(You can increase the z values in the vertexarray to make it even easier
to notice)
I see "Obj size: 2" in output from "MESA_VERBOSE=VERBOSE_IMMEDIATE"
instead of "Obj size: 3"...

(This bug is there with and without my above fix)

Andree



_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to