[PyKDE] Python and OpenGL performance.

Toby Sargeant t.sargeant at inpharmatica.co.uk
Mon Jun 18 12:18:11 BST 2001


> >QT and GL turns out to be a *very* nice combination. I've switched from
> >writing C++/SDL/GL to Python/QT/GL, and until it becomes too slow to cope
> >with (hint: display lists are your friend), I think I'm going to stay there.
> 
> What kind of performance do you achieve with Python/QT/GL? I'd be
> interested in using it for small experiments and some small game projects.
> Does hw acceleration work ok?

[Sorry, can't provide framerates -- I'm at work.]

I've been using the nvidia drivers with a 64M GeForce 2 GTS card on an 800 MHz
Athlon. Displaying objects from display lists is really fast -- certainly
completely functional.

Python seems really good for OpenGL as long as you're not making complex
adjustments to the geometry you're displaying.

Doing realtime geometry calculation is a little slow.  Using bounding spheres,
but with very little optimisation otherwise, I can still do ray intersection
with a ~100 polygon model fast enough for realtime interaction.

On the whole, I'd say that it's very useable, and if you use Python like it's
a scripting language, and don't expect C performance out of it, you won't be
disappointed. Being able to skip the recompile step is really great for
quickly debugging camera positionining etc, and it's quite possible that with
C extensions for doing the lowlevel work, Python would make a really great
framework for all kinds of 3d visualisation.

-- 
  [ Toby Sargeant : Inpharmatica : Developer : t.sargeant at inpharmatica.co.uk ]
      [ http://www.inpharmatica.co.uk : 020 7074 4600 fax 020 7631 4844 ]




More information about the PyQt mailing list