Hi Nathan,

I could not comment on installation issues since I am neither maintainer of 
pycollada nor experienced python developer. 

Regarding daeview errors - you are right, there were couple of bugs when 
running on Mac OSX (I have no Mac and did not test on OSX). Nevertheless, 
with the help from Jeff Terrace these bugs are fixed 
now<https://github.com/pycollada/pycollada/pull/28>. 
Please pull the new version from git if you like to try it once again.

BTW, this example is now merged into the main pycollada 
repository<https://github.com/pycollada/pycollada>. 
So it is probably better to pull get the latest version from there.

Regards,
Andrey.

On Wednesday, September 19, 2012 12:27:12 AM UTC+2, Nathan wrote:
>
> On Tue, Sep 18, 2012 at 2:28 PM, Andrey Nechypurenko <
> [email protected] <javascript:>> wrote:
>
>> Hi Folks,
>>
>> I am currently working on the project where it is necessary to visualize 
>> COLLADA 
>> (DAE) <http://www.khronos.org/collada/> files. For these purposes I 
>> decided for pyglet OpenGL wrappers and 
>> pycollada<http://pycollada.github.com/>(which is the library to read collada 
>> files). To learn how to do it I have 
>> made an 
>> example<https://github.com/andreynech/pycollada/tree/master/examples/daeview>and
>>  just want to let pyglet community know about it. Maybe it could be 
>> useful for somebody.
>>
>> The example has two renderers - the old-style which uses OpenGL display 
>> lists and the modern-style which uses GLSL shaders and VBOs (with pyglet's 
>> batches). So to some extent, it could be also considered as an example how 
>> to visualize 3D models with pyglet using modern OpenGL techniques.
>>
>> Regards,
>> Andrey.
>>
>>
> Looks interesting--but it doesn't work for me.  :-(  Here's my experience:
>
> 1) 'python setup.py install' for pycollada failed trying to automatically 
> install numpy
> 2) I installed numpy myself: 'pip install numpy'
> 3) Then installing pycollada worked.
> 4) examples/daeview.py crashed with this output:
>
> daeview $ python daeview.py 
> Creating display list...
> It could take some time. Please be patient :-) .
>   diffuse = Texture speedometr_bmp: (not available)
>   diffuse = Texture compas_bmp: (not available)
>   diffuse = Texture speedometr_bmp: (not available)
>   diffuse = Texture earth2_jpg: (not available)
> done. Ready to render.
> Traceback (most recent call last):
>   File "daeview.py", line 69, in <module>
>     pyglet.app.run()
>   File 
> "/Users/nathan/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pyglet/app/__init__.py",
>  
> line 123, in run
>     event_loop.run()
>   File 
> "/Users/nathan/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pyglet/app/base.py",
>  
> line 127, in run
>     self._legacy_setup()
>   File 
> "/Users/nathan/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pyglet/app/base.py",
>  
> line 218, in _legacy_setup
>     window.dispatch_pending_events()
>   File 
> "/Users/nathan/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pyglet/window/cocoa/__init__.py",
>  
> line 322, in dispatch_pending_events
>     EventDispatcher.dispatch_event(self, *event)
>   File 
> "/Users/nathan/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pyglet/event.py",
>  
> line 355, in dispatch_event
>     if handler(*args):
>   File "daeview.py", line 26, in on_draw
>     daerender.render(window.rotate_x, window.rotate_y, window.rotate_z)
>   File 
> "/Users/nathan/proj/extra/pycollada/examples/daeview/renderer/OldStyleRenderer.py",
>  
> line 180, in render
>     glCallList(self.displist)
>   File 
> "/Users/nathan/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/pyglet/gl/lib.py",
>  
> line 105, in errcheck
>     raise GLException(msg)
> pyglet.gl.lib.GLException: invalid operation
>
> 5) So I switched the renderer in daeview.py to "GLSLRenderer" by swapping 
> the commented renderer lines as instructed, and got this crash:
>
> daeview $ python daeview.py 
> Running with OpenGL version:
> Traceback (most recent call last):
>   File "daeview.py", line 63, in <module>
>     daerender = renderer.GLSLRenderer(collada_file)
>   File 
> "/Users/nathan/proj/extra/pycollada/examples/daeview/renderer/GLSLRenderer.py",
>  
> line 48, in __init__
>     print 'Running with OpenGL version:', glutils.getOpenGLVersion()
>   File 
> "/Users/nathan/proj/extra/pycollada/examples/daeview/renderer/glutils.py", 
> line 13, in getOpenGLVersion
>     return cast(versionString, c_char_p).value
> NameError: global name 'cast' is not defined
>
>
> I'm using pyglet 1.2dev (completely up-to-date tip of the hg repo), python 
> 2.7.3 installed via pythonbrew, on OS X 10.8.1.
>
> ~ Nathan
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pyglet-users/-/yfDYAg4r51MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to