Re: How to use NSOpenGLContext.setValues_forParameter_ with PyObjC <= 2.2?
Ronald Oussoren <[email protected]>
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
On 6 Feb, 2011, at 11:26, Phillip Nguyen wrote: > > Hi, > > I'm writing code for Snow Leopard that I would like to support the default installed version of PyObjC. I'm calling NSOpenGLContext.setValues_forParameter_() which takes as its first argument a pointer to an int (or array of ints). It seems to work fine in PyObjC 2.3, but in PyObjC 2.2b3 I get > > ValueError: depythonifying 'pointer', got 'int' > > I don't know enough about PyObjC to figure out how to supply the 'pointer' that it wants. Currently I am using a horrible hack involving ctypes: That's probably the easiest way to do this in 2.2b3, I've fisxed a number of bugs in the wrappes in later versions and this is one of them. The fix involved changed to C code and is hence not easily reproduced in scripts. Ronald ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb