PyOpenGL

Discussion in 'Python' started by groups.diegopark@gmail.com, Feb 4, 2008.

  1. Guest

    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
    , Feb 4, 2008
    #1
    1. Advertising

  2. wrote:

    > 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
    Diez B. Roggisch, Feb 4, 2008
    #2
    1. Advertising

  3. wrote:
    > 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
    Mike C. Fletcher, Feb 4, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Hunter

    pyopengl / python2.3 / win32

    John Hunter, Sep 22, 2003, in forum: Python
    Replies:
    0
    Views:
    298
    John Hunter
    Sep 22, 2003
  2. Arthur
    Replies:
    1
    Views:
    403
    Dave Benjamin
    Oct 6, 2003
  3. Jimmy Johns

    pyOpenGL for python 2.3

    Jimmy Johns, Nov 16, 2003, in forum: Python
    Replies:
    3
    Views:
    315
    Jimmy Johns
    Nov 18, 2003
  4. Steven Gutstein
    Replies:
    3
    Views:
    393
    Mike C. Fletcher
    Dec 30, 2003
  5. F. GEIGER
    Replies:
    9
    Views:
    1,217
    F. GEIGER
    May 3, 2004
Loading...

Share This Page