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

Re: [pygame] Extending OpenGL support in Pygame



Presumably the textures have an alpha channel. If so, that would seem possible to hide that requirement from the developer by making the excess invisible and checking collisions outside OpenGL. It might be useful to have optional exceptionsÂfor inefficient sprite sizes (defaulting to off, perhaps looking at an environment variable? I'm not sure where would be best to put that flag in Python), if doing that (and similar things for other cases where it's a problem) has a significant impact on performance. That way it would be in dropable andÂpresumablyÂgive some immediate improvement, but you could go back and fix up where required to get more speed later.

Russell

On 5 April 2012 18:25, Santiago Romero <sromero@xxxxxxxxxxx> wrote:
> I believe that's just textures, as in images that are imported. Thus, it
> would not affect the base Surface class or the draw module.

ÂBut in 3D-games rendered as "2D games" (2D opengl games), the sprite images themselves (animation frames) are textures projected in a cube-face, aren't they?

ÂI mean that your sprites, players, enemies, items, etc, must fit the 2^-size requirement...



--
Santiago Romero
Ubuntu GNU/Linux
http://www.sromero.org