Sign in to follow this  
Cannibal_Coder

Python + OpenGL = problems.

Recommended Posts

Ive been able to use openGL in C/C++ but when trying to use it in Python im having nothing but troubles. Ive downloaded PyOpenGL and as many related modules as I can find but they all require opengl.gl which I dont seem to have. So does anyone know what im missing or can give me any help/suggest? TIA

Share this post


Link to post
Share on other sites
Ive got pyopengl. Ive downloaded all the modules it says it requires. What im missing is OpenGL.gl. Atleast thats what it says im missing when I try to run a prog calling for it.

Share this post


Link to post
Share on other sites
hmmm. I'm not sure what the problem could be. pyopengl is supposed to provide that module. Are you sure you followed the instructions here:
http://pyopengl.sourceforge.net/documentation/installation.html

What are you running it on? windows/linux/mac?

Share this post


Link to post
Share on other sites
Are you using the normal python distribution or the activestate one (http://www.activestate.com/Products/ActivePython)? Maybe PyOpenGL assumes the normal one and they handle libraries differently... I have no idea at all.

EDIT: you can make sure OpenGL.GL is in your python path by starting the python interpreter and printing "sys.path" (you need to import sys first). Then figure out where PyOPenGL is installed in windows (search for "texture_cube_map.py" for example. Its part of the library.) Then make sure wherever OpenGL is is part of your python path. You can just do sys.path.append("path to OpenGL") to test it.

[Edited by - rollo on June 30, 2005 3:36:19 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Cannibal_Coder
I dont even have openGL.gl on my HD. Did a search for it an got nothing...the big bupkis. Thats my problem Im guessing.


Do you have numpy installed? How did you install PyOpenGL on your system? For example, did you start here?
http://pyopengl.sourceforge.net/documentation/installation.html
and install Numpy v.23, and the python image library?

You might want to start out by checking that the version of python you have on your system matches up with what PyOpenGL needs. PyOpenGL is compiled to a specfic semi-major release of Python. The latest PyOpenGL (version 2.0.x) is built for Python release 2.3.

If you open a command termianl and type in "python" you will launch into interactive session of python, and it will report the Python version in the start banner.
If you need to use Python 2.4 you will have to rebuild PyOpenGL, which is pretty straight forward, though you have to install many more support packages, and you _must_ make sure your path is selecting the correct version of swig.

Older releases of both python and PyOpenGL are happy to coexist on your machine. If you are on windows, the PyOpenGL installer is pretty nice about detecting your installation of Python so everything goes to the right location. What system are you on?

Tell us the exact error message that is printed in your command window when you try to run your python program and we'll try to figure out what went wrong.
I'm assuming here that you have opened up a command shell and can enter something like:
python MyGlobalIlluminationFPS.py

-brian


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this