Hi all,
I tried to use labels with ordered groups and it seems to dramatically
decrease performances. Can anyone confirm ? Here is a quick test, just
replace "group" with None for fast, in my case, when group is an
OrderedGroup, I get around 50 fps while with no group I get around
1600 fps.
Nicolas
----
import pyglet
import random
window = pyglet.window.Window(512,512,vsync=0)
fps_display = pyglet.clock.ClockDisplay()
pyglet.clock.schedule(lambda dt: None)
batch = pyglet.graphics.Batch()
group = pyglet.graphics.OrderedGroup(0)
group = None
for i in range(100):
x = int(random.random()*window.width)
y = int(random.random()*window.height)
label = pyglet.text.Label('Hello world !',
x=x,y=y,batch=batch,group=group)
@window.event
def on_draw():
window.clear()
batch.draw()
fps_display.draw()
pyglet.app.run()
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---