Two solutions come to mind:

- Reduce the size of the textures, either by using native texture
compression (GL_ARB_texture_compression if supported), reducing the
resolution of certain textures (this could be configurable as in many
commercial games), or simply using fewer different images in your
atlas

- Reorder the textures so that swapping is minimized. Put all of you
background textures together and make sure they are drawn first, then
do another batch from the next texture atlas, etc. There will still be
swapping, but hopefully not as much. You might find that using smaller
atlases is better if you aren't going over by much.

Bottom line though is that 64MB of VRAM isn't very much these days,
something's probably got to give in the quality dept.

-Casey

On Thu, Oct 23, 2008 at 12:12 AM, josch <[EMAIL PROTECTED]> wrote:
>
> I tried to replace the 2048x2048 with four 1024x1024 and the
> performance decrease only hit when adding the fourth texture - makes
> sense because i have 64MB video memory on my intel X3100.
> So what do I do? I need this much space!
> Should I divide everything up into smaller textures so that only that
> texture is fetched from memory that is really needed and is also not
> so big?
> When playing around with four 1024x1024 i clearly saw that the one
> texture that was obviously swapped to system memory was much faster to
> get as the decrease was only down to 100fps and not 40fps.
> Or should I dynamically TextureAtlas.add() stuff?
>
> On Oct 23, 7:58 am, "Alex Holkner" <[EMAIL PROTECTED]> wrote:
>> On Thu, Oct 23, 2008 at 4:36 PM, josch <[EMAIL PROTECTED]> wrote:
>> > but then when i uncomment the texture atlas line and have another
>> > 2048x2048 texture - it drops from 500fps to 40fps!!
>> > all other texture atlas size combinations work - only two times
>> > 2048x2048 gives this strange performance drop!
>>
>> I'd guess that you're hitting your video RAM limit -- with two
>> 2048x2048 textures, the driver is needing to page them in and out of
>> video memory within each frame.
>>
>> Alex.
> >
>

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