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

Re: [pygame] Pygame VS PyOpengl?



campbell barton wrote:
hello all, I am going to make a 2D game which will use lots of
alpha's and a scrolling background, (ala chromium bsu)

What I would like to know is- Can pygame use hw alpha surfaces (Even
IF the moons have to be alligned) or would PyOpengl be a faster
option?
anytime you want to use graphics with alpha. opengl is probably the only option. 2d hardware and software can do quick colorkeys, but software alpha is pretty slow, and hardware alpha doesn't really exist for most 2d apis (and therefore, even slower). on the other hand, it is very "easy" to use graphics with alpha in pygame, usually just not fast enough.

you can mix pygame and pyopengl very well. pygame can handle all the window/sound/input stuff, and all the rendering is done with straight opengl calls.

the best way to draw the graphics in opengl is with textured quads. there is some stuff in opengl to "blit" 2d graphics to the display, but this is a slow pipeline on most graphics cards.




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