PyOpenGL on Linux: waiting for hardware acceleration

Mordy Ovits movits at lockstar.com
Mon May 10 17:04:23 EDT 1999


srenner at lycosmail.com wrote:
[SNIP]
> If you've read this far, you might be interested in doing an open source
> collaborative project. Here are some ideas:
> 
> *Various projects based on my attention-renderer, already released in
> the PyOpenGL demo directory. (There's a new release coming soon). This
> already implements some new ideas, like infinitely detailed objects.
> (You know, fractals.) 
> 
> *How about a ray-tracer or scanline renderer in pure Python? It would
> be dead slow but interesting to write, especially the shaders. I've
> rejected this before because my realtime renderer seemed more
> interesting, but if others want to work on this I say let's do it. (Did
> I mention radiosity?)

Ray tracer in Python is cool but purposeless.  Why not write the renderer in C
and have an embedded Python interpreter that allows for:

a) Procedural objects - e.g object/ray intersection code calls a python function
to do the work.  that allows for REALLY nifty objects, and you can add more
without recompiling the renderer

b) Procedural textures -- you get the idea

c) New input formats.  If you expose the internal c objects to the embedded
python, you can have the python load a new file type and set up the internal
data structures

d) high-level animation scripting.  mmmmm...animation...mmmmm.

BTW...apparently TrueSpace now has an embedded Python interpreter.  Don't know
how far they took it tho.

About radiosity:  The very thought of doing something that compute-intensive in
pure python makes my processor wilt in fear.  Again, a multi-language route
would seem to be a better way to go.
		
> *If you happen to have a retinal display with eye movement tracking JUST
> LYING AROUND please mail me IMMEDIATELY.

You funny.

-- 
o Mordy Ovits
o Cryptographic Engineer
o LockStar Inc.
---------------------------------------------------------------------------
#!/usr/local/bin/python 
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))




More information about the Python-list mailing list