OpenGL

Discussion in 'Python' started by NaeRey, Jan 22, 2006.

  1. NaeRey

    NaeRey Guest

    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
    NaeRey, Jan 22, 2006
    #1
    1. Advertising

  2. NaeRey

    Will McGugan Guest

    NaeRey wrote:
    > 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
    --
    http://www.willmcgugan.com
    "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in
    "jvyy*jvyyzpthtna^pbz")
    Will McGugan, Jan 22, 2006
    #2
    1. Advertising

  3. NaeRey wrote:

    > 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.


    http://pyopengl.sourceforge.net/

    </F>
    Fredrik Lundh, Jan 22, 2006
    #3
  4. NaeRey

    NaeRey Guest

    If you notice the project died, being latest release Jan2 2005. Thats
    over a year old.
    NaeRey, Jan 22, 2006
    #4
  5. "NaeRey" wrote:

    > 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>
    Fredrik Lundh, Jan 22, 2006
    #5
  6. NaeRey wrote:
    > 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
    Mike C. Fletcher, Jan 23, 2006
    #6
  7. NaeRey

    Guest

    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
    , Jan 23, 2006
    #7
  8. wrote:
    > 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
    Mike C. Fletcher, Jan 23, 2006
    #8
  9. 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
    Fernando Perez, Jan 23, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Skinner

    OpenGL from JNI on MacOSX

    Andy Skinner, Jan 8, 2004, in forum: Java
    Replies:
    0
    Views:
    491
    Andy Skinner
    Jan 8, 2004
  2. nos

    openGL and 1.5

    nos, Mar 5, 2004, in forum: Java
    Replies:
    3
    Views:
    559
    Christophe Vanfleteren
    Mar 5, 2004
  3. Gene Davis

    Java Bindings for OpenGL

    Gene Davis, Jun 26, 2004, in forum: Java
    Replies:
    0
    Views:
    403
    Gene Davis
    Jun 26, 2004
  4. Gene Davis
    Replies:
    0
    Views:
    421
    Gene Davis
    Jul 5, 2004
  5. =?iso-8859-1?B?bW9vcJk=?=

    Where can I load org.eclipse.swt.opengl into my project?

    =?iso-8859-1?B?bW9vcJk=?=, Jan 11, 2006, in forum: Java
    Replies:
    0
    Views:
    476
    =?iso-8859-1?B?bW9vcJk=?=
    Jan 11, 2006
Loading...

Share This Page