[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] using opengl in pygame?



   Thanks for the quick reply...

The first one was the restriction on texture sizes allowed in video memory, and the (then) small amount of video memory.
I found it inconvenient at the very least for all images I loaded to have to have width/height sizes as specific powers of two (using a non power of two caused unecisary memory waste, or just plain didnt work). Is this still the case? ...
if so, are there clever ways around it (besides having to create all spritesheets etc in those exact dimensions)?

As far as I now this is still the case. I haven't found the wastage from
bumping your images to the next power of 2 to be an issue. It feels a bit
crude, but I would guess that it allows the underlying calculations to be
faster.


Imagion the sitation where I have 30 different character sprite sheets, each with 300 frames of animation each not very many for a 2d game.
Plus, add HUD images, menu images, all the extras that come up in a game (particles, mouse cursors, etc)
If the smallest size is fairly large, I would have to pack unrelated art into the same physical image file, if the largest size is too small I would have to split related frames into seperate files. - Clearly it becomes a problem.

Perhaps there is a dynamic which could run some sort of bin-packing algorithm to best use the video memory to free me of having to deal with this problem, and just load images as I would with a 2d api?

- Jacob