OpenGL

N

NaeRey

Hey, I've been searching for something like a PyOpenGL implementation
that allows Python to use OpenGL, found only a few projects and most
are either in beta and dead, or alpha stage.
Anyone knows a package thats currently being worked on and is
functional?
Thanks
 
W

Will McGugan

NaeRey said:
Hey, I've been searching for something like a PyOpenGL implementation
that allows Python to use OpenGL, found only a few projects and most
are either in beta and dead, or alpha stage.
Anyone knows a package thats currently being worked on and is
functional?
Thanks

Something _like_ a PyOpenGL implementation? What about PyOpenGL itself?

http://pyopengl.sourceforge.net/


Will McGugan
 
N

NaeRey

If you notice the project died, being latest release Jan2 2005. Thats
over a year old.
 
F

Fredrik Lundh

NaeRey said:
If you notice the project died, being latest release Jan2 2005. Thats
over a year old.

so? OpenGL itself hasn't had a release since 2004. that's even more dead.

</F>
 
M

Mike C. Fletcher

NaeRey said:
If you notice the project died, being latest release Jan2 2005. Thats
over a year old.
Died, no. We have a rather small developer community, basically myself
and a few people who contribute a module here or there. Most (really,
all) of the time being spent on PyOpenGL these days is focusing on the
OpenGL-ctypes implementation, which hopefully will let far more people
work on the source-code (and add features and coverage of more extensions).

Have fun,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
 
S

seb.haase

Does that mean PyOpenGL is based on ctypes ?
I thought is was using SWIG ?
And on that note: I have some (old) SWIG typemaps for numarray arrays
that I'm using for many years.

I was always wondering how difficult it would be for me to add them
into PyOpenGL ?

So far I'm just using my own (one !) OpenGL function with that typemap
to draw 60000 vertices in a vector linestrip. But I would like to not
have to resort to "string conversion" when for example drawing 2D
typemaps...

Anyway, thanks a lot for PytOpenGL - my program (image analysis
platform and microscope control) would not be possible without it.
Sebastian Haase
 
M

Mike C. Fletcher

Does that mean PyOpenGL is based on ctypes ?
PyOpenGL, the project with releases, binaries on most platforms, and
lots of history is currently written in SWIG. It was originally written
in pure Python C-extension code, then Tarn rewrote it using SWIG a few
years ago. OpenGL-ctypes is in the PyOpenGL CVS repository, it's a
ctypes re-re-implementation of the same Python API to OpenGL. My
intention is that the ctypes implementation will become the 3.0.0
release when it is finished and optimised. If there's time and enough
interest I'll try to produce another maintenance release for
PyOpenGL-SWIG, but I'm really quite tired of spelunking through dozens
of levels of C-code macro expansions, so I'm not all that interested in
working with the codebase.
I thought is was using SWIG ?
And on that note: I have some (old) SWIG typemaps for numarray arrays
that I'm using for many years.

I was always wondering how difficult it would be for me to add them
into PyOpenGL ?
Likely difficult, for the SWIG version. You might be able to
*substitute* them quite readily for the Numpy mapping, but having the
APIs support two different numeric systems requires some API to switch
between them, which requires rewriting the (really-deeply-embedded)
typemaps to support that. The difficulty of doing that kind of change
is part of what prompted me to rewrite the system in Python (using ctypes).
So far I'm just using my own (one !) OpenGL function with that typemap
to draw 60000 vertices in a vector linestrip. But I would like to not
have to resort to "string conversion" when for example drawing 2D
typemaps...

Anyway, thanks a lot for PytOpenGL - my program (image analysis
platform and microscope control) would not be possible without it.
Sebastian Haase
OpenGL-ctypes is designed with a fairly well abstracted array-handling
API. Basically any array type can be registered with handlers that let
you tell the system how to do basic operations; get an array's size,
shape, data-type, convert to a given data-format, build an "empty" array
of a given size, that kind of thing. I haven't written a numarray one
yet, but it should be a fairly trivial change from the Numpy/scipy-core
module.

Have fun,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
 
F

Fernando Perez

Mike C. Fletcher wrote:

OpenGL-ctypes is designed with a fairly well abstracted array-handling
API. Basically any array type can be registered with handlers that let
you tell the system how to do basic operations; get an array's size,
shape, data-type, convert to a given data-format, build an "empty" array
of a given size, that kind of thing. I haven't written a numarray one
yet, but it should be a fairly trivial change from the Numpy/scipy-core
module.

Mike, out of curiosity: are you using the new 'array protocol' from numpy?
I mean this one:

http://numeric.scipy.org/array_interface.html

Best,

f
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top