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

Re: [pygame] is fast opengl a possibility in pygame?



Matt Bailey wrote:

On Wednesday 24 August 2005 18:15, Jasper fired a shotgun at the keyboard and the following appeared:


I use Display Lists for just about everything, and they greatly speed
drawing; without them my game would be infeasible in pygame. I'm doing
something fairly similar to what you describe, using a textured quad for
each hex in a gameboard, all of which are drawn in one display list.
The soldiers are drawn in their own display lists, so they can move
indpendently of the board.
http://img374.imageshack.us/img374/4086/0824160601screen0mc.jpg



Hey, that's pretty kewl looking. Got a web page with more info?



Not yet! I keep putting it off as there is so much to do. By the end of the year, and more likely by the end of September.


Btw..........do you know if there are any memory or other resource problems that arise from infinitely creating displaylists? I was doing this on a sort of particle generator....each new particle generated a new displaylist (yes, horribly slow, this was early code). Now I just build one list and pass it to each particle instance at run-time.........basically I'm calling the same list for every instance of the particle (actually, smoke puff). I'm just wondering if my previous use of infinite displaylists may have been causing some of my performance issues over time.



Compiling display lists takes a bit of time, as well as memory. I would imagine creating them unnecessarily and never deleting them would slow things down by some scalar factor, and leak memory. Using OpenGL you have to be carefull, since there's no garbage collector to clean up memory you allocate.


-Jasper