Hi Josh, Did you find a way to enhance performance?
I did notice Alex spoke about blit_into (http://www.pyglet.org/doc/api/ pyglet.image.Texture-class.html#blit_into) whilst you used blit_to_texture. Don't know if this would affect performance though. On Nov 21, 2:24 am, josch <[email protected]> wrote: > On Nov 21, 1:59 am, swiftcoder <[email protected]> wrote: > > > The simple fix for this is to invert your texture coordinates, whi,e > > leavign the image upside-down which will correct the issue with no > > performance loss. > > yeah good idea - i will use that. but i have to process the image data > once anyway (moved this to resource loading) to convert it from ctypes > array to binary string by calling _ensure_string_data() > > i also observed that i can blit my image data without these calls: > > pyglet.gl.glPushClientAttrib(pyglet.gl.GL_CLIENT_PIXEL_STORE_BIT) > pyglet.gl.glPixelStorei(pyglet.gl.GL_UNPACK_ALIGNMENT, alignment) > pyglet.gl.glPixelStorei(pyglet.gl.GL_UNPACK_ROW_LENGTH, row_length) > pyglet.gl.glPopClientAttrib() > > so all i do now is to call glBindTexture followed by multiple > glTexSubImage2D calls. > but it would be nice to know why these calls are there in the first > place and why it works for me without them. > > somehow this is still slow (250blits take 0.1sec) but it's faster than > it took my gfx hw to load all the additional data from vram in my > previous memory heavy approach. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
