New issue 13 by thibault...@gmail.com: GLError in several demos
http://code.google.com/p/glumpy/issues/detail?id=13
What steps will reproduce the problem?
1. Run filters.py from demos/
2. The window is not properly refreshed, and an error message is shown
Same error occurs for various demos such as game-of-life.py.
What version of the product are you using? On what operating system?
glumpy 0.2-1
Linux 3.1.5-6.fc16.x86_64 #1 SMP x86_64 GNU/Linux
2.1 Mesa 7.11.2
Gallium 0.4 on AMD JUNIPER
Please provide any additional information below.
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 313, in 'calling callback function'
File "/usr/lib/python2.7/site-packages/glumpy/window/backend_glut.py",
line 238, in _display
self.dispatch_event('on_draw')
File "/usr/lib/python2.7/site-packages/glumpy/window/event.py", line 349,
in dispatch_event
if handler(*args):
File "filters.py", line 69, in on_draw
width=frame.width, height=frame.height)
File "/usr/lib/python2.7/site-packages/glumpy/image/image.py", line 208,
in draw
self._filter.activate( self._texture )
File "/usr/lib/python2.7/site-packages/glumpy/image/filter.py", line 173,
in activate
self.build()
File "/usr/lib/python2.7/site-packages/glumpy/image/filter.py", line 261,
in build
kernel.size, 0, gl.GL_ALPHA, gl.GL_FLOAT, kernel)
File "/usr/lib/python2.7/site-packages/OpenGL/latebind.py", line 45, in
__call__
return self._finalCall( *args, **named )
File "/usr/lib/python2.7/site-packages/OpenGL/wrapper.py", line 791, in
wrapperCall
raise err
OpenGL.error.GLError: GLError(
err = 1281,
description = 'invalid value',
baseOperation = glTexImage1D,
pyArgs = (
GL_TEXTURE_1D,
0,
GL_ALPHA32F_ARB,
256,
0,
GL_ALPHA,
GL_FLOAT,
array([ 0.5, 0.5, 0.5, 0.5, 0.5, ...,
),
cArgs = (
GL_TEXTURE_1D,
0,
GL_ALPHA32F_ARB,
256,
0,
GL_ALPHA,
GL_FLOAT,
array([ 0.5, 0.5, 0.5, 0.5, 0.5, ...,
),
cArguments = (
GL_TEXTURE_1D,
0,
GL_ALPHA32F_ARB,
256,
0,
GL_ALPHA,
GL_FLOAT,
array([ 0.5, 0.5, 0.5, 0.5, 0.5, ...,
)
)
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 313, in 'calling callback function'
File "/usr/lib/python2.7/site-packages/glumpy/window/backend_glut.py",
line 238, in _display
self.dispatch_event('on_draw')
File "/usr/lib/python2.7/site-packages/glumpy/window/event.py", line 349,
in dispatch_event
if handler(*args):
File "filters.py", line 69, in on_draw
width=frame.width, height=frame.height)
File "/usr/lib/python2.7/site-packages/glumpy/image/image.py", line 208,
in draw
self._filter.activate( self._texture )
File "/usr/lib/python2.7/site-packages/glumpy/image/filter.py", line 173,
in activate
self.build()
File "/usr/lib/python2.7/site-packages/glumpy/image/filter.py", line 261,
in build
kernel.size, 0, gl.GL_ALPHA, gl.GL_FLOAT, kernel)
File "/usr/lib/python2.7/site-packages/OpenGL/latebind.py", line 41, in
__call__
return self._finalCall( *args, **named )
File "/usr/lib/python2.7/site-packages/OpenGL/wrapper.py", line 791, in
wrapperCall
raise err
OpenGL.error.GLError: GLError(
err = 1281,
description = 'invalid value',
baseOperation = glTexImage1D,
pyArgs = (
GL_TEXTURE_1D,
0,
GL_ALPHA32F_ARB,
256,
0,
GL_ALPHA,
GL_FLOAT,
array([ 0.5, 0.5, 0.5, 0.5, 0.5, ...,
),
cArgs = (
GL_TEXTURE_1D,
0,
GL_ALPHA32F_ARB,
256,
0,
GL_ALPHA,
GL_FLOAT,
array([ 0.5, 0.5, 0.5, 0.5, 0.5, ...,
),
cArguments = (
GL_TEXTURE_1D,
0,
GL_ALPHA32F_ARB,
256,
0,
GL_ALPHA,
GL_FLOAT,
array([ 0.5, 0.5, 0.5, 0.5, 0.5, ...,
)
)
glxinfo attached
Attachments:
glx.info 24.4 KB
Comment #1 on issue 13 by Nicolas...@gmail.com: GLError in several
demos
http://code.google.com/p/glumpy/issues/detail?id=13
I suspect the GL_ALPHA32F_ARB is responsible. Could you try with
GL_ALPHA_32F instead ? (you'll need to modify the sources).
Hmm, I am not familiar with OpenGL, but for some reason it doesn't
recognize GL_ALPHA_32F :
AttributeError: 'module' object has no attribute 'GL_ALPHA_32F'
File "/usr/lib/python2.7/site-packages/glumpy/image/filter.py", line 260,
in build
Sorry, I meant GL_ALPHA32F
I tried it too, but it still doesn't work:
AttributeError: 'module' object has no attribute 'GL_ALPHA32F'
You can see here, what attributes are available:
http://pyopengl.sourceforge.net/pydoc/OpenGL.GL.html
For some reason constants from OpenGL.raw.GL.ARB.texture_float are not
included in OpenGL.GL namespace on some platforms. Everything works fine
with PyOpengl-3.0.1 on freebsd, but fails on windows with pyopengl 3.0.2a4
(from http://www.lfd.uci.edu/~gohlke/pythonlibs)
One workaround would be to explicitly import
OpenGL.(raw.?)GL.ARB.texture_float and then remove gl. prefix from
GL_ALPHA32F_ARB
For some reason constants from OpenGL.raw.GL.ARB.texture_float are not
included in OpenGL.GL on some platforms. Everything works fine with
PyOpengl-3.0.1 on freebsd, but fails on windows with pyopengl 3.0.2a4 (from
http://www.lfd.uci.edu/~gohlke/pythonlibs)
One workaround would be to explicitly import
OpenGL.raw.GL.ARB.texture_float and then remove gl. prefix from
GL_ALPHA32F_ARB