jonwright / pyopengltk

OpenGL frame for Python/Tkinter via ctypes and pyopengl
MIT License
54 stars 13 forks source link

[WIP] First rushed attempt getting os x frame working #11

Open einarf opened 4 years ago

einarf commented 4 years ago

Work in progress

Leaving this PR here hanging for a bit to share what I have done so far.

If anyone have any input on how to get the surface of the tkinter window and register it in the context?

CGLSetSurface connects a surface that is part of a window to a GL context

einarf commented 4 years ago

I have no idea yet. Thanks for the links. Will add that to the list of things to dig into.

Can let this PR hang here for a while. We can merge it if I give up this attempt, but we should probably disable the darwin import.

einarf commented 4 years ago

An alternative is using AGL : https://developer.apple.com/documentation/agl/agl

Probabably a good idea to do a deep dive into the internals in TkInter. I'll make a Frame implementation for both cgl and agl. Time will see what works out.

The togl 2.0 source is using agl and is a great reference!

einarf commented 4 years ago

Still have not forgotten about this one. I think using agl is the right path. Still doing local experiments for now until I figure out the best solution.

einarf commented 4 years ago

AGL seem to be the way to go. I just need to figure out how to get the proper window pointer.

mitchell-merry commented 11 months ago

Hi mate, what is the status on this PR? Just ran into this today while running vispy