Thomas Hansen
unread,Oct 19, 2009, 10:03:35 PM10/19/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet-users
Hey everyone,
I'm trying to get VTK (Visualization Toolkit) to draw into a pyglet
window. VTK lets me easily set the window to draw into by using a
function called vtkWindow::SetWindowInfo. On windows, this works
great with a pyglet window and self._hwnd. On linux it also works
great using self._window (of the pyglet window).
On OSX things don't seem to work out though...passing self._window
doesn't seem to do much at all. I'm pretty sure the VTK function
wants a pointer to a HIView. However, the _window attribute of a
pyglet window is a WindowRef. I have tried using carbon.HIViewGetRoot
(self._window), which makes the window decoration the color the VTK
window draws to its background. I dont't have much experience with
carbon..so really i don't think i know what I'm doing. I think maybe I
want the child HIView of teh one returned by HIViewGetRoot?
I've tried going a step further by trying to call carbon.HIViewFindByID
(root, carbon.kHIViewWindowContentID, byref(win_id)) . where root is
the result of the call to carbon.HIViewGetRoot(self._window) and
win_id is a c_void_p() i was expecting my result in ... but the code
just hangs when i try to make this call.
Any ideas?
Thanks