Re: [Pyobjc-dev] Fwd: PyObjC and NSOpenGLView
Brought to you by:
ronaldoussoren
From: Tobias W. <t.w...@im...> - 2010-01-05 12:00:59
|
On 5 Jan 2010, at 10:43, Ronald Oussoren wrote: > > Sorry about not replying sooner. "py2app -A" doesn't work at the moment on SL, IIRC someone has sent me a fix for that. > > You should be able to run the example using 'python setup.py py2app' without the -A. > > Ronald, who's too lazy to run the example himself ;-) Thanks Ronald, I seem to have things working now. I ran py2app without -A, and then had to correct a couple of other problems with the OpenGL demo - 1) py2app was not copying ctypes.utils into Resources/ properly, this is used somewhere deep in PyOpenGL. Fixed by importing in OpenGLDemo.py so py2app picks it up (Ugly but works) 2) The call to glViewport needs a cast to int for the width and height of the view rect, which are passed in as floats. I've attached my modified OpenGLDemo.py below. I then used this as the basis for my WorldView class, and it seems to be working including the call to gluPerspective. I'll let you know if I have any more trouble. Thanks for the help, it is much appreciated. Toby |