alex@thinkpad:~/src/mlrawviewer$ python mlrawviewer.py ./M08-1336.RAW
MlRawViewer v1.0.1
(c) Andrew Baldwin & contributors 2013
Falling back to Numpy for bit unpacking operations.
Consider compiling bitunpack module for faster conversion.
Opening MLRAW file ./M08-1336.RAW
Width: 1920 Height: 1080 Frames: 60
Traceback (most recent call last):
File "/home/alex/src/mlrawviewer/GLCompute.py", line 223, in __draw
self.onDraw(w,h)
File "mlrawviewer.py", line 186, in onDraw
self.init()
File "mlrawviewer.py", line 178, in init
self.demosaic = DemosaicScene(self._raw,size=(self._raw.width(),self._raw.height()))
File "mlrawviewer.py", line 93, in __init__
self.rawUploadTex = GLCompute.Texture((self.raw.width(),self.raw.height()),rgbadata=frame0.rawimage,hasalpha=False,mono=True,sixteen=True)
File "/home/alex/src/mlrawviewer/GLCompute.py", line 85, in __init__
glTexImage2D(GL_TEXTURE_2D,0,GL_R32F,self.width,self.height,0,GL_RED,GL_UNSIGNED_SHORT,rgbadata)
File "/usr/local/lib/python2.6/dist-packages/PyOpenGL-3.0.2-py2.6.egg/OpenGL/latebind.py", line 45, in __call__
return self._finalCall( *args, **named )
File "/usr/local/lib/python2.6/dist-packages/PyOpenGL-3.0.2-py2.6.egg/OpenGL/wrapper.py", line 792, in wrapperCall
raise err
GLError: GLError(
err = 1281,
description = 'invalid value',
baseOperation = glTexImage2D,
pyArgs = (
GL_TEXTURE_2D,
0,
GL_R32F,
1920,
1080,
0,
GL_RED,
GL_UNSIGNED_SHORT,
array([[16382, 16382, 16382, ..., 163...,
),
cArgs = (
GL_TEXTURE_2D,
0,
GL_R32F,
1920,
1080,
0,
GL_RED,
GL_UNSIGNED_SHORT,
array([[16382, 16382, 16382, ..., 163...,
),
cArguments = (
GL_TEXTURE_2D,
0,
GL_R32F,
1920,
1080,
0,
GL_RED,
GL_UNSIGNED_SHORT,
array([[16382, 16382, 16382, ..., 163...,
)
)
Python 2.6.5, PyOpenGL 3.0.2.
Tried to print the arguments before the call to glTexImage2D:
print self.width, self.height
print rgbadata
print glGetIntegerv(GL_MAX_TEXTURE_SIZE)
=>
1920 1080
[[16382 16382 16382 ..., 16382 16382 16382]
[16382 16382 16382 ..., 16382 16382 16382]
[16382 16382 16382 ..., 16382 16382 16382]
...,
[ 9928 6171 11226 ..., 6250 11173 6021]
[10345 6163 10482 ..., 5800 10179 6075]
[10423 5907 9725 ..., 5539 10362 5808]]
4096
Also tried smaller textures (64x64) and 8-bit, didn't help.
NeHe lesson 6 (texture mapping) runs fine (it has a call to glTexImage2D and seems to work).
Will keep looking, but maybe you have any suggestions on what to try?