Hello,<br><br>I found some bugs in opengl examples.<br><br>1. Wrong conversion of the original C++ code.<br><br>It is in grabber.py.<br>I changed as following to get the correct behavior.<br><br>FROM<br> def resizeGL(self, height, width):<br>
TO<br> def resizeGL(self, width, height):<br><br>Before changing the code like the above, the opengl widget portion of the window couldn't be shrinked or enlarged correctly.<br>From the original C++ code, we can see that the modified is correct.<br>
<br>2. OpenGL related error message from grabber.py, hellogl.py and textures.py on mac osx.<br><br>I got the following OpenGL related error message from the above three files on mac osx only.<br><br>Traceback (most recent call last):<br>
File "grabber.py", line 131, in resizeGL<br> glViewport((width - side) / 2, (height - side) / 2, side, side)<br> File "/Library/Python/2.5/site-packages/OpenGL/error.py", line 194, in glCheckError<br>
baseOperation = baseOperation,<br>OpenGL.error.GLError: GLError(<br> err = 1281,<br> description = 'invalid value',<br> baseOperation = glViewport,<br> cArguments = (0, 0, -1, -1)<br>
)<br><br>I inserted a line to see the value of width and height in resizeGL and I could notice that the resizeGL was called twice.<br><br>francis-macbook-pro:opengl ycc$ python grabber.py 2>/dev/null<br>-1 0<br>179 164<br>
<br>As you can see from above, the first line contains strange values.<br>So, I entered the following two lines right after "def resizeGL..." as a workarround.<br><br> if height < 0 or width < 0:<br>
return<br><br>This was not happened with some old snapshots.<br>I forgot the specific name of the snapshots.<br><br><br>Thanks,<br><br>Francis Cho<br><br>