PyOpenGL installation

PyOpenGL installation

Postby metulburr » Wed Apr 30, 2014 6:13 pm

I am trying to install/run basic OpenGL demo programs, but i keep getting errors.

i installed these packages:
https://pypi.python.org/pypi/PyOpenGL-a ... te/3.1.0b2
https://pypi.python.org/pypi/PyOpenGL/3.1.0b2
via
Code: Select all
sudo python2 setup.py install

Code: Select all
metulburr@arch ~ $ python2
Python 2.7.6 (default, Feb 26 2014, 12:07:17)
[GCC 4.8.2 20140206 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenGL
>>>


Thats all fine and dandy, but i also installed the demos and tried them and come up with these errors:


Code: Select all
metulburr@arch /usr/lib/python2.7/site-packages/PyOpenGL-Demo/tom $ python2 cone.py
No handlers could be found for logger "OpenGL.Tk"
Traceback (most recent call last):
  File "cone.py", line 15, in <module>
    from OpenGL.Tk import *
  File "/usr/lib/python2.7/site-packages/PyOpenGL-3.1.0b2-py2.7.egg/OpenGL/Tk/__init__.py", line 119, in <module>
    _default_root.tk.call('package', 'require', 'Togl')
_tkinter.TclError: can't find package Togl
metulburr@arch /usr/lib/python2.7/site-packages/PyOpenGL-Demo/tom  $

Code: Select all
metulburr@arch /usr/lib/python2.7/site-packages/PyOpenGL-Demo/GLE  $ python2 texas.py
Traceback (most recent call last):
  File "texas.py", line 67, in <module>
    maintest.main(DrawStuff)
  File "/usr/lib/python2.7/site-packages/PyOpenGL-Demo/GLE/maintest.py", line 40, in main
    glutInit(sys.argv)
  File "/usr/lib/python2.7/site-packages/PyOpenGL-3.1.0b2-py2.7.egg/OpenGL/GLUT/special.py", line 326, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
TypeError: 'NoneType' object is not callable
metulburr@arch /usr/lib/python2.7/site-packages/PyOpenGL-Demo/GLE  $


one of mekires opengl scripts
Code: Select all
metulburr@arch ~/Downloads/Mekire-gltut-python-pygame-pyopengl-b6eb9a66403e/01_h
ello_triangle  $ python2 01_hello_triangle.py
Traceback (most recent call last):
  File "01_hello_triangle.py", line 84, in <module>
    main()
  File "01_hello_triangle.py", line 72, in main
    MyGL = GLtests()
  File "01_hello_triangle.py", line 35, in __init__
    self.shader = compileProgram(compileShader(VERT,GL.GL_VERTEX_SHADER),
  File "/usr/lib/python2.7/site-packages/PyOpenGL-3.1.0b2-py2.7.egg/OpenGL/GL/shaders.py", line 226, in compileShader
    shaderType,
RuntimeError: ('Shader compile failure (0): 0:2(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES\n', ['\n       #version 330\n       layout(location = 0) in vec4 position;\n       void main()\n       {\n          gl_Position = position;\n       }'], GL_VERTEX_SHADER)
metulburr@arch ~/Downloads/Mekire-gltut-python-pygame-pyopengl-b6eb9a66403e/01_h
ello_triangle  $


I am not sure what exactly is wrong. I can assume from the last one that the version might conflict, but the first two shouldn't be, because they are the demos from that version. I am not sure if i am missing another package that may be needed? This is also under Arch Linux, so i wouldnt be surprised if there was a prerequisite that i am missing. Again, not sure though.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1299
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: PyOpenGL installation

Postby Mekire » Wed Apr 30, 2014 6:18 pm

Try and see if you can update the version of GLSL (OpenGL shader language) that your machine uses. I remember installing everything (especially on linux) was a bit of a pain, but I don't remember exactly what I needed to do.

-Mek
User avatar
Mekire
 
Posts: 976
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan

Re: PyOpenGL installation

Postby metulburr » Wed Apr 30, 2014 6:32 pm

Ive never even heard of OpenGL shader language. Nor do i know how to update it. I did a quick search around it, but i keep ending up at a point that describes it, instead of describing how to update it.

Code: Select all
metulburr@arch ~ $ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD JUNIPER
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.1.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
metulburr@arch ~ $
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1299
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: PyOpenGL installation

Postby metulburr » Sun May 04, 2014 8:42 am

i tried the same in ubuntu 14.04, and i get the same errors
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1299
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: PyOpenGL installation

Postby Mekire » Sun May 04, 2014 9:54 am

I thought I remembered getting this to work in Linux but I'm currently trying and getting the same results.
It should be a matter of updating graphics drivers, but this seems easier said than done.

>.>
-Mek
User avatar
Mekire
 
Posts: 976
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan

Re: PyOpenGL installation

Postby metulburr » Sun May 04, 2014 8:10 pm

I thought I remembered getting this to work in Linux but I'm currently trying and getting the same results.

Me too. I thought a year or two ago i had it working as i remember some 3d tank turrent example i had running, which i only would of used opengl for. Apparently i should of wrote down the procedure to getting it to work.

Ill post the problem in some linux forums and get back to you if i find anything.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1299
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest