won't using OpenGL in pygame add more dependencies?

--- On Sat, 4/18/09, Ian Mallett <geometr...@gmail.com> wrote:

From: Ian Mallett <geometr...@gmail.com>
Subject: Re: [pygame] C/C++ and Python
To: pygame-users@seul.org
Date: Saturday, April 18, 2009, 7:11 PM

On Sat, Apr 18, 2009 at 11:55 AM, Zack Schilling <zack.schill...@gmail.com> 
wrote:


I use Numpy to control particles drawn with OpenGL. Since PyOpenGL can take a 
Numpy array of coordinates and render it as shapes or points, all the actual 
work is done outside Python. I can make bursts or streams of thousands and 
thousands of particles, each with its own position, color, lifespan, velocity, 
and acceleration, then render the effect inside of a  game running at 60 FPS 
without a problem.





-ZackIn addition to using libraries that are written in C, you can take 
advantage of other parts of the computer to process code faster.  For 
particles, I personally use the GPU, which can easily render over a million 
particles at a decent clip.  You might be able to get increased speed by using 
multiple threads, though I have my doubts.  I think the best solution is to 
write good code in the first place and leave the rest.  







      

Reply via email to