From: Hugh F. <hug...@an...> - 2006-06-08 01:38:00
|
Some thoughts regarding possible implementations of Visual Python on top of PyGL. (Scene graphs in the next message.) Implementing Visual Python on top of PyGL wouldn't get rid of all the C++ code. PyGL wraps the OpenGL API, but that doesn't cover window creation or keyboard/mouse handling. The big advantage I can see of using PyGL is that new graphical primitives could be written in Python and added at runtime, instead of the current requirement to write them in C++ and rebuild cvisual. As Jonathan points out, all the primitives in VP are static geometries so can be compiled into display lists. The overhead of OpenGL calls in Python rather than C++ would be minimal and I doubt anyone would notice. Jonathan observed we could use GLUT for window, keyboard, and mouse handling. GLUT is simple, but it might be worth thinking about wxPython which is a cross platform GUI toolkit instead. Or, just leave the window management and event handling in C++ as done now. The major disadvantage is that it introduces a dependancy on another piece of software. One of the things that makes Visual Python great is that you download it and it Just Works. (Well, almost always.) Basing VP on PyGL means having to point users at another download site, or shipping a copy of PyGL with every copy of VP, or ... I'm sure it can be done, but is it worth the hassle? -- Hugh Fisher DCS, ANU |