On Wed, Aug 26, 2009 at 8:53 AM, Richard Thomas <[email protected]> wrote:

>
> I've been trying to make a small test case for glMultiDrawElements and
> I think I have something:
>
> import pyglet
> from pyglet.gl import *
>
> w = pyglet.window.Window(400, 400)
> b = pyglet.graphics.Batch()
>
> vdata = ('v2f', [10, 10, 390, 10, 390, 390, 10, 390, 200, 200])
> cdata1 = ('c4B', [255, 0, 0, 0] * 5)
> cdata2 = ('c4B', [0, 255, 0, 0] * 5)
> cdata3 = ('c4B', [0, 0, 255, 0] * 5)
>
> b.add_indexed(5, GL_TRIANGLES, None, (0, 1, 2), vdata, cdata1)
> vl = b.add_indexed(5, GL_TRIANGLES, None, (0, 4, 3), vdata, cdata2)
> b.add_indexed(5, GL_TRIANGLES, None, (4, 2, 3), vdata, cdata3)
> vl.delete()
>
> @w.event
> def on_draw():
>    w.clear()
>    b.draw()
>
> pyglet.app.run()
>
> Without the vl.delete() it draws three triangles as expected, with it
> we only see the red triangle. This was on an early '09 MacBook and the
> latest 1.1 maintenance. Can anyone confirm this on other hardware?
>
> Richard
>

wow!
windows xp + sp3, nvidia 6600 here.

1. using the workaround that force ignore glDrawMulti renders stable, as
seen in i423_workaround_b.png

2. without the workaround things are crazy:
   a. the window starts black
   b. moving the mouse over the client area, the image flickers between full
black, a triangle with gradient, and some that resembles the correct image
  c. after a few seconds the system turns irresponsive ( mouse cursor
freezed, no kbd response, even you cant bring up the task manager ) After
some more seconds, the system can respond , with the app running. In one
run, after the freeze, after some seconds it would briefly flash fullscreen
black, then silently died, ie no GPF.

--
claxo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

<<attachment: i423_no_workaround.png>>

<<attachment: i423_no_workaround_b.png>>

<<attachment: i423_workaround_b.png>>

Reply via email to