Fwd: PyOpenGL-ctypes OS X

Etienne Desautels <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
I'm a user of PyOpenGL working on Linux/OS X. Yesterday I decided to 
test PyOpenGL 3-ctypes on OS X.

The test machine is an old Powerbook Titanium G4 667 running 10.3.9! I 
took the CVS version of PyOpenGL and compile the latest version 
(1.0.3-2) of Numpy.

tests.py ran without problem:
Ran 10 tests in 3.793s

OK

And I took the time to test the demo files. Here are the results:

OpenGL/Demo
GLE/cone.py					YES
GLE/helix.py				YES
GLE/texas.py				YES
GLUT/gears.py				YES
GLUT/molehill.py			YES
GLUT/tom/arraytest.py		YES
GLUT/tom/checker.py			YES
GLUT/tom/cone.py			YES
GLUT/tom/conechecker.py		YES
GLUT/tom/conesave.py		YES
GLUT/tom/lorentz.py			NO (Bus error)
GLUT/tom/text.py			YES
NeHe/lesson1.py				YES
NeHe/lesson2.py				YES
NeHe/lesson3.py				YES
NeHe/lesson4.py				YES
NeHe/lesson5.py				YES
NeHe/lesson6.py				YES
NeHe/lesson6-multi.py		YES
NeHe/lesson13.py			(win32 specific)
NeHe/lesson18.py			YES (but "L" doesn't change lightning)
NeHe/lesson41.py			YES
NeHe/lesson42.py			YES (but slow, maybe that's normal!)
NeHe/lesson43/lesson43.py	NO (ValueError: Unable to locate true type 
font 'Test.ttf' but the font is there?)
NeHe/lesson44/lesson44.py	DON'T KNOW (The flare is visible only when 
the end of the cylinder face the screen?)
NeHe/lesson45.py			YES (after adding Terrain.bmp to the directory, it 
was not there)


I also test one of my project and I think I found a bug in 
glGenTextures. If I'm not wrong, glGenTextures is suppose to return an 
array of GLuint. But when you generates only one texture it return a 
GLuint and when you generates more then one it returns an array of 
numpy.uint32 ?

I can resume the two cases with this code:

CASE 1
...init
textures = glGenTextures(1)
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textures[0])

   File "./test.py", line 164, in ?
     glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textures[0])
TypeError: unsubscriptable object

CASE 2
...init
textures = glGenTextures(2)
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textures[0])

   File "./test.py", line 164, in ?
     glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textures[0])
ctypes.ArgumentError: argument 2: exceptions.TypeError: wrong type

BUT if you do this, it works...
...init
textures = glGenTextures(1)
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textures)


Have an idea ? The problem is probably in the def of glGenTextures in 
exceptions.py but I don't understand "annotations". So I was not able 
to patch it.

Also I did a new extension (a really easy one!) 
OpenGL.GL.EXT.texture_rectangle.

If you're curious, here is the project I did with PyOpenGL:
http://www2.ville.montreal.qc.ca/museumsnature/ars_natura/ars_natura.htm

Etienne Desautels

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-devel
OpenGL.tar.gz (application/x-gzip, 2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.