Thanks that helped alot.

For future reference here is my solution:

negative pitch is countered by flipping the texture coordinates as
suggested:
#default: texture.tex_coords = ((0, 0, 0), (1, 0, 0), (1, 1, 0), (0,
1, 0))
texture.tex_coords = ((0, 1, 0), (1, 1, 0), (1, 0, 0), (0, 0, 0))

The image format was solved by converting it beforehand using numpy:
#BGRA TO RGB

a = numpy.frombuffer(surf_clip.get_data(), numpy.uint8)
a.shape = (sw, sh, 4)
a = a[:,:,0:3] #drop alpha channel
temp = copy(a[:,:,0])

a[:,:,0] = a[:,:,2]
a[:,:,2] = temp

After all that blit time was reduced to 0.0014 seconds a 7x
improvement :-)
My next optimization step is to use glitz, but first i have to make
python bindings...


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to