From: Alexander A. <ale...@gm...> - 2011-09-04 18:07:52
|
Hi Kevin, I am working to make Togl (you know the OpenGL interface for OpenGL) work under Tk-Cocoa, the days of Carbon are over. I am linking the Proposed Patch by Chimera : http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/foreign/Togl/togl-cocoa.patch The problem is with TkMacOSXDrawbableWindowRef, this function does not exist and as the patch info tell, you need a patch to Tk-Cocoa to expose the window. So TkMacOSXDrawbableWindowRef is a custom function that one should make. What I did is to download the tarball of TCL/TK 8.5.9 backported for Cocoa and write this function in tkMacOSXXStubs.c WindowRef TkMacOSXDrawableWindowRef(Drawable d){ WindowRef windowRef = TkMacOSXDrawableWindow(d); return windowRef; } And compiled the tk framework. Did I do the right thing? Inspite of solving this issue instead of getting a drawable for OpenGL window, I get a white window, OpenGL commands work but the problem is that they are not rendered. Any suggestions on this? Even if I solve this issue I will still need to include the tk framework when I distribute my program since the program will search in the Tk framework on another machine to find TkMacOSXDrawbableWindowRef. Thanks, Alexander. On Sun, Sep 4, 2011 at 6:02 PM, Kevin Walzer <kw...@co...> wrote: > On 9/2/11 6:21 AM, Alexander Agathos wrote: > > Hi, > > > > I am working on a code that has TkMacOSXDrawbableWindowRef, this function > is no longer supported in TCL/TK 8.5.9 Cocoa should I replace it with > TkMacOSXDrawbableWindow? I have tried this and the linker can't find it and > returns an error. I have tried recompiling the Cocoa based TCL/TK 8.5.9 with > no luck the function can't be found. What should I do? > > > > Cheers, > > Alexander. > > It might be helpful if you gave more detail on what you are trying to do > and posted some sample code, as well as the error messages you are seeing. > > --Kevin > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > |