[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Pyopengl blitting vs quads?



On Sun, 9 Mar 2003, campbell barton wrote:
> I need fast 2D alpha images, opengl supports a kind of blitting.
> glDrawPixels( textureSurface.get_width(), textureSurface.get_height(),
> GL_RGBA, GL_UNSIGNED_BYTE, textureData)
> 
> Works but I cant get alphas, does anyone know weather DrawPixels is slower
> or faster then textures on quads?

I would guess textures from what I've read, but I don't know.

> PS, I also found that textures on quads need to be 128x128, 256x256,
> 512x512 etc- I bit of a limitation.

There are several ways around this, e.g. mipmapped textures don't have this
limitation; see the NeHe tutorial #8 IIRC.  You can also scale textures up to
fit into these constraints, or simply create an "empty" texture, and then
blit an offsize texture into it.

However, I've found that even with mipmapped textures, having one of the
"standard" sizes loads much faster.

-Jasper

PS  I found the following post from Bob Ippolito helpfull:
http://aspn.activestate.com/ASPN/Mail/Message/1421019


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org