hello there!

i'm doing this tile engine with animation, zooming and stuff.
my problem arose when adding animations.
I had to load a lot more into video memory and my intel X3100 is
unable to cope with like 64mb data in vram.

i tested this with this little script:
http://phpfi.com/373981
when adding more than one 2048x2048 texture to the scene it slows down
below 12fps despite only a few GL_RECTS are drawn.

my original setup was to distribute all my map objects and animation
frames in several 1024x1024 textures so that no animation has to be
split between two textures so that i could animate by only exchanging
the textcoords.
i move around the map by dynamically resizing current vertex lists, add
()-ing new ones and delete()-ing old ones as required.
i have to delete() and add() because if i let zero sized vertex lists
being drawn the according textures will still be loaded each frame
even when no texture_region from them is used and this drops the
performance to 3fps on big maps with overall 64MB of stuff in
textures.

this proved to be fast on small maps as i could animate with only
changing tex_coords and since the overall texture size was not big
also drawing went with around 50fps.

but on big maps this way is nearly impossible to do as with a lot of
map objects, a lot of different textures have to be loaded which add
up to too much data for my gfx card.

so i decided to take even smaller textures so that in the same scene
more textures would have to be used but the overall size would be
smaller. this proved to be true and on big maps i get more fps with
this method.

but the problem is: when using 512x512 sized textures or smaller i
also have to split a lot of animations into different textures. so on
every animation frame i have to dynamically resize/add/delete the same
way as i do on moving. and this slows things down again - on small
maps from 50fps to 35fps. this is still okay but when combining this
with movement i get below 8fps.

to summarize:
my overall problem is not that my gfx card can draw not enough
rectangles but that it is unable to cope with more than one 2048x2048
texture.
the smaller i do the textures, the more resize/delete/add i have to do
and this slows down again.
the larger the textures, the slower it will get due to my vram
restrictions.

my only solution up to now is to just disable animations so that not
much vram will be used but can you guys think of other alternatives?
--~--~---------~--~----~------------~-------~--~----~
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