Geom-Path Throwing Error 1280
Am trying to implement a geometry shader in my current project, so decided to try the geom-path example. Unfortunately the same thing happens to geom-path as in my own geometry shader tests - this error is thrown.
I am using: cython-0.29 glumpy-1.0.6 numpy-1.15.3 triangle-20170429
[w] Cannot read STENCIL size from the framebuffer
[i] Using GLFW (GL 3.0)
[i] Running at 60 frames/second
Traceback (most recent call last):
File "geometry_shader_example.py", line 348, in <module>
app.run()
File "/usr/local/lib/python3.6/dist-packages/glumpy/app/__init__.py", line 302, in run
clock = __init__(clock=clock, framerate=framerate, backend=__backend__)
File "/usr/local/lib/python3.6/dist-packages/glumpy/app/__init__.py", line 262, in __init__
window.dispatch_event('on_resize', window._width, window._height)
File "/usr/local/lib/python3.6/dist-packages/glumpy/app/window/event.py", line 394, in dispatch_event
if getattr(self, event_type)(*args):
File "/usr/local/lib/python3.6/dist-packages/glumpy/app/window/window.py", line 219, in on_resize
self.dispatch_event('on_draw', 0.0)
File "/usr/local/lib/python3.6/dist-packages/glumpy/app/window/event.py", line 384, in dispatch_event
if handler(*args):
File "geometry_shader_example.py", line 342, in on_draw
program.draw(gl.GL_LINE_STRIP_ADJACENCY_EXT, I)
File "/usr/local/lib/python3.6/dist-packages/glumpy/gloo/program.py", line 592, in draw
self.activate()
File "/usr/local/lib/python3.6/dist-packages/glumpy/gloo/globject.py", line 86, in activate
self._create()
File "/usr/local/lib/python3.6/dist-packages/glumpy/gloo/program.py", line 175, in _create
self._build_shaders(self._handle)
File "/usr/local/lib/python3.6/dist-packages/glumpy/gloo/program.py", line 223, in _build_shaders
shader.activate()
File "/usr/local/lib/python3.6/dist-packages/glumpy/gloo/globject.py", line 86, in activate
self._create()
File "/usr/local/lib/python3.6/dist-packages/glumpy/gloo/shader.py", line 216, in _create
self._handle = gl.glCreateShader(self._target)
File "/usr/local/lib/python3.6/dist-packages/OpenGL/error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 1280,
description = b'invalid enumerant',
baseOperation = glCreateShader,
cArguments = (GL_GEOMETRY_SHADER_EXT,),
result = 0
)
Do you know what is your system and GL driver ?
I am running Ubuntu 18.04.1 LTS
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.0.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
Can you try without the_EXT?
How would I go about doing that? thanks for all the help so far
You'll have to (temporarily) modify glumpy sources in glumpy/gloo/shader.py.
Do you mean changing the following line:
def __init__(self, code=None, vertices_out=0, input_type=None, output_type=None):
Shader.__init__(self, gl.GL_GEOMETRY_SHADER_EXT, code)
to
def __init__(self, code=None, vertices_out=0, input_type=None, output_type=None):
Shader.__init__(self, gl.GL_GEOMETRY_SHADER, code)
No success with that, same error as before.
Yes, it is was I meant. Can you try code from https://github.com/rougier/glsl-experiments and check if the geometry shader one works?
Sadly same error as before, with and without the _EXT
Despite changing the gloo/shader.py file I notice that in the error message I still have mentions of _EXT.
Traceback (most recent call last):
File "geometry_shader_example_experiment.py", line 315, in <module>
geometry = gl.glCreateShader(GL_GEOMETRY_SHADER_EXT)
File "/usr/local/lib/python3.6/dist-packages/OpenGL/error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 1280,
description = b'invalid enumerant',
baseOperation = glCreateShader,
cArguments = (GL_GEOMETRY_SHADER_EXT,),
result = 0
)
Changing Line 315 to
geometry` = gl.glCreateShader(GL_GEOMETRY_SHADER)
I get this error:
Traceback (most recent call last):
File "geometry_shader_example_experiment.py", line 315, in <module>
geometry = gl.glCreateShader(GL_GEOMETRY_SHADER)
NameError: name 'GL_GEOMETRY_SHADER' is not defined
Can you try on the console a glxinfo (or something like this) to check if your driver reports geometry shader extension?
Interesting - no mention of geometry shaders in glxinfo. Ran glxinfo | grep "geometry" just to make sure and no output. Do I need to upgrade my version of openGL or is this a hardware issue? I'm running ubuntu as a virtual machine, might that be making a difference?
Ouch, yes, that might be a reason. The first few lines of glxinfo shoudl report what is the driver for GL. If it is indirect, that's not good (emulated through Mesa probably).
Think I'm definitely running it through Mesa, my OpenGL Version Sring is 3.0 Mesa 18.0.5.
Is all hope lost or is there something I can do?
The important part is whether you have direct rendering (access to GPU) or not. If not then I don't see any solution using the virtual machine. What it your host system?