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

Re: [pygame] using opengl in pygame?



On Jun 21, 2004, at 2:12 AM, Jasper Phillips wrote:

On Sun, 20 Jun 2004, Jacob Schwartz wrote:

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.
You can always shove a bunch of your textures into one big texture and do things that way.. it's worked pretty well for me, though the code is a little more convoluted.

Also, I forget which extension it is, but modern video cards support non-power-of-2 texture sizes. Anything that supports Quartz Extreme in OS X this feature, so all newish Macs can be expected to support it... though you'll probably be competing pretty fiercely with WindowServer for texture memory on the older cards unless you're running full screen :)

-bob

Attachment: smime.p7s
Description: application/pkcs7-signature