PyOpenGL

  • Thread starter groups.diegopark
  • Start date
G

groups.diegopark

Hi all,

I apologize if this question was already answered before but I was
unable to find a proper solution to my problem. Anyways, I am trying
to run shaderobjects.py on Windows (Python 2.5.1) by just double-
clicking, and I got the following error:

[...]
File "/usr/lib/python2.5/site-packages/OpenGL/extensions.py", line 13,
in hasGLExtension
AVAILABLE_GL_EXTENSIONS[:] = glGetString( GL_EXTENSIONS ).split()
AttributeError: 'NoneType' object has no attribute 'split'

_I think_ I have all requirements and packages properly installed.

Any clues? Thanks in advance !

Regards,
Diego Park
 
D

Diez B. Roggisch

Hi all,

I apologize if this question was already answered before but I was
unable to find a proper solution to my problem. Anyways, I am trying
to run shaderobjects.py on Windows (Python 2.5.1) by just double-
clicking, and I got the following error:

[...]
File "/usr/lib/python2.5/site-packages/OpenGL/extensions.py", line 13,
in hasGLExtension
AVAILABLE_GL_EXTENSIONS[:] = glGetString( GL_EXTENSIONS ).split()
AttributeError: 'NoneType' object has no attribute 'split'

_I think_ I have all requirements and packages properly installed.

Any clues? Thanks in advance !

http://pyopengl.sourceforge.net/documentation/manual/glGetString.3G.html

"""
Notes
If an error is generated, glGetString returns 0.
"""

seems to be the case here. Check for whatever the error-code is - glGetError
is your friend.

Diez
 
M

Mike C. Fletcher

Hi all,

I apologize if this question was already answered before but I was
unable to find a proper solution to my problem. Anyways, I am trying
to run shaderobjects.py on Windows (Python 2.5.1) by just double-
clicking, and I got the following error:

[...]
File "/usr/lib/python2.5/site-packages/OpenGL/extensions.py", line 13,
in hasGLExtension
AVAILABLE_GL_EXTENSIONS[:] = glGetString( GL_EXTENSIONS ).split()
AttributeError: 'NoneType' object has no attribute 'split'

_I think_ I have all requirements and packages properly installed.

Any clues? Thanks in advance !
That *looks* like a problem with calling glGetString before you have a
valid context. Normally that actually works on GLX platforms, but
apparently not in this case. Try delaying your import until after you
have the context setup and see if that lets glGetString return a valid
pointer.

HTH,
Mike

--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top