[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] mirra 0.2.5



kschnee@xxxxxxxxxx wrote:
Mirra looks interesting, but I can't get it to work. I have Python 2.3 and
Pygame installed, along with PIL. The code complained repeatedly about not
having GLUT available, eg.:

File "C:\Python\mirra0.2.5.4\mirra\graphics.py", line 84, in __init__
self.q = gluNewQuadric() # because if i do it as global there is an error
on osx and linux, therefore it is a prop
NameError: global name 'gluNewQuadric' is not defined

I commented out various references to GLUT and to wxPython; I had to do
the latter because otherwise, gui.py gives an error from trying to define
"class MyFrame(wxFrame)". Even so I can't make even the demo
"example6pygame" work. Was this tested on a machine without GLUT or
wxPython installed? As written it seems to require all three systems just
to compile, rather than any-of-them.

sorry i didnt explain it in depth.
basically the graphics are done with openGL and this is why pyOpenGL must be installed. Then handle the events, open the window to display the opengl graphics etc... can be done with different systems, for example pygame, wxpython and GLUT (which is part of opengl). There are more of course but these are the most used (correct me if i am wrong). So because GLUT is part of openGL i choose it to be the built in system despite of being simpler than the others. In this latest release i decided to include support for pygame and Wxpython because this would mean that more people could use it and and the same time we would benefit from the features provided by pygame or wxpython (like standard GUI elements or sound).


So to run Mirra you do need PyopenGL and PIL and then optionaly you need pygame and/or wxPython.

PIL is requiered to import images to convert them into opengl textures. This is because GLUT doesnt have any builtin system to import images as far as i understand. Pygame has one but sometimes i need to use wxpython and this doesnt like pygame much so whe i built this part of mirra i had to choose a system that didnt relay on neither pygame or wxpython.

All this makes me think that maybe i should forget about GLUT and implement just pygame and wxpython and the image importing code could be different for each of the systems then getting rid of PIL ... interesting idea.

i hope it is more clear now. :)

--
altern