Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Error using pyOpenGl, 'module' object has no attribute 'TextureBufferUniform'

  1. #1
    Junior Member Newbie
    Join Date
    May 2018
    Posts
    3

    Error using pyOpenGl, 'module' object has no attribute 'TextureBufferUniform'

    Hi, I just learn to use OpenGl on c++ but now I'd like to use it on python but when I run the code from this tutorial http://pyopengl.sourceforge.net/cont.../shader_1.html

    I get the following error
    Code :
    Traceback (most recent call last):
      File "_ctypes/callbacks.c", line 314, in 'calling callback function'
      File "/Library/Python/2.7/site-packages/OpenGLContext/glutcontext.py", line 136, in OnRedisplay
        self.triggerRedraw(1)
      File "/Library/Python/2.7/site-packages/OpenGLContext/context.py", line 610, in triggerRedraw
        self.OnDraw()
      File "/Library/Python/2.7/site-packages/OpenGLContext/context.py", line 515, in OnDraw
        visibleChange = self.renderPasses( self )
      File "/Library/Python/2.7/site-packages/OpenGLContext/passes/renderpass.py", line 862, in __call__
        from OpenGLContext.passes.flatcompat import FlatPass
      File "/Library/Python/2.7/site-packages/OpenGLContext/passes/flatcompat.py", line 2, in <module>
        from . import _flat
      File "/Library/Python/2.7/site-packages/OpenGLContext/passes/_flat.py", line 10, in <module>
        from OpenGLContext.scenegraph import shaders
      File "/Library/Python/2.7/site-packages/OpenGLContext/scenegraph/shaders.py", line 228, in <module>
        class TextureBufferUniform( _TextureUniform, shaders.TextureBufferUniform ):
    AttributeError: 'module' object has no attribute 'TextureBufferUniform'

    and I go to the file with the error and in fact there is an error
    Code :
    from vrml.vrml97 import shaders
    ...
    class TextureBufferUniform( _TextureUniform, shaders.TextureBufferUniform ):
    ...

    and in vrml.vrml97 there is no definition of TextureBufferUniform.
    Maybe I installed a wrong version or something.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,791
    Quote Originally Posted by fransebas View Post
    Maybe I installed a wrong version or something.
    That seems likely. This version has a TextureBufferUniform definition in vrml97/shaders.py.

    If you're already familiar with using OpenGL from C++, I'd suggest ignoring OpenGLContext and just using PyOpenGL directly (PyOpenGL includes bindings for GLUT).

  3. #3
    Junior Member Newbie
    Join Date
    May 2018
    Posts
    3
    Quote Originally Posted by GClements View Post
    That seems likely. This version has a TextureBufferUniform definition in vrml97/shaders.py.
    Thanks! I going to try with that, (it weird because I download the file using pip).

    Quote Originally Posted by GClements View Post
    If you're already familiar with using OpenGL from C++, I'd suggest ignoring OpenGLContext and just using PyOpenGL directly (PyOpenGL includes bindings for GLUT).
    That's option B, I'm kind of lazy XD.

  4. #4
    Junior Member Newbie
    Join Date
    May 2018
    Posts
    3
    Quote Originally Posted by GClements View Post
    That seems likely. This version has a TextureBufferUniform definition in vrml97/shaders.py.

    If you're already familiar with using OpenGL from C++, I'd suggest ignoring OpenGLContext and just using PyOpenGL directly (PyOpenGL includes bindings for GLUT).
    Yea!!! it was that, I finally install it. The tutorial has a link for the download but downloads the previous version, I uninstall and download again from pip.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •