~ Nathan
Rather than join in your list, I'll just post some quick
clarifications which you can repost there. If your members have more
questions about pyglet etc, they are of course welcome to join this
list or email me.
Re: "No conforming visual": this looks like a 16-bit depth issue that
was fixed quite a while ago, but please make sure the author checks
with a newer version and opens an issue if not.
Re: "OpenGL/SDL/PyOpenGL":
For your requirements, only OpenGL will suffice (accelerated 3D
graphics on Mac/Windows/Linux). OpenGL is a graphics API that is
exposed on Windows, Linux and Mac. To use OpenGL from Python, you can
use either pyglet or PyOpenGL.
Regardless of whether pyglet or PyOpenGL is used to call the OpenGL
functions, you still need an OpenGL "context" -- a window into which
the graphics can be drawn. pyglet can provide you with such a
context, as can PyGame (PyOpenGL can too, with GLUT, but this has
limitations). Most other GUI toolkits, such as wxPython, PyGtk and
Tkinter can also create OpenGL contexts.
So, you should choose your context creator first: say, pyglet, if you
like its event and windowing system; or PyGame, if you prefer SDL's
event and windowing system (PyGame uses SDL, a C library, internally).
You may decide to go with PyGtk or wxPython etc instead, if you want
to use their GUI components.
Having chosen a context, you can then proceed to use OpenGL via pyglet
or PyOpenGL.
Re: "DirectX/OpenGL":
pyglet only uses DirectX for audio -- graphics are still done using
OpenGL on Windows. There are no DirectX bindings for Python that I'm
aware of (though you could use the COM interfaces directly, if you
were suitably masochistic).
Hope that clears up some things
Alex.
> Thanks for your reply. So pygame+pyopengl is more or less equivalent
> to pyglet? I.e. it runs on win, linux, mac and it allows you to do
> basically the same things?
Well, see the respective feature lists for the differences; they are
equivalent if _all_ you want to do is render to a single opengl
context.
>
> I am interested in reasons you stared pyglet, instead of improving
> pygame+pyopengl - pyglet must have some advantages. For example being
> a small, pure python library.
PyGame is fundamentally limited by SDL; a feature addition (such as
adding support for multiple windows) would require a modification to
SDL, to the PyGame DLL and to the PyGame Python modules.
Incidentally, the PyGame DLL is not required now that ctypes is
available; I rewrote PyGame to use ctypes last year but the then
maintainers were not interested in making the switch.
Because pyglet doesn't use SDL it can have include many features that
PyGame cannot (yet).
Alex.