On Jan 23, 6:41¬†pm, Richard Jones <[email protected]> wrote:
> The source repository is athttp://code.google.com/p/pyglet/source/checkout- 
> I'll need to know
> your Google Code login to grant commit privs. Richard Thomas' code is
> in the cocoa-port branch of the repository. It's probably best to keep
> the cocoa work there (or in a new branch if you like) until it's
> solid.

Richard:

I think my Google Code login is the same as my email address,
[email protected].  I agree that keeping everything in the cocoa-
port branch for now is a good idea.  Most of my code changes are
additive, so I don't think it will be necessary to create a new
branch.


Tristam:

I came across that same post about the setValues:forParameter: patch
-- I took it as a bad sign that someone had already solved this in
2006, but the fix doesn't seem to be in even the 2.4 development
version of PyObjC.  I thought maybe that I could trick PyObjC into
working with ctypes like this:

        cglContext = self._nscontext.CGLContextObj()  # <--- PyObjC
object
        dir(cglContext)  # we have to call this first in order to find
pointerAsInteger??
        ctypes_context = c_void_p(cglContext.pointerAsInteger)
        param = c_int(1)
        quartz = cdll.LoadLibrary(util.find_library('Quartz'))
        quartz.CGLSetParameter(ctypes_context, kCGLCPSwapInterval,
byref(param))

but no luck.  Since the pointerAsInteger attribute isn't documented,
I'm not totally sure that there is any reason for it to work.  Plus it
looks horrible.

Richard, if you have any links to projects working on a ctypes-objc
bridge, I'd be interested in looking at them.  If it were possible to
get the window and events code set up with ctypes based objc, then I
think everything else might be able to be written using the c-based
core libraries.

--phillip

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
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