-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenGL visualisation with Python #288
base: master
Are you sure you want to change the base?
Conversation
Concrete questions:
|
let's keep it specialised for now as it will give us quite some interesting insights I think. Hence the latency and context closing. Also it might be easier to do this from C instead of Python. |
I was just thinking that the vulkan API might be relevant as well as it already provides thread safe constructs |
To do threaded rendering at all, we'd need to move to a "command buffer" approach, which we'd need to implement ourselves: https://gpfault.net/posts/opengl-command-buffers.txt.html Or we'd need to move to more modern contexts that do support it (vulkan/metal), which for now isn't realistic. I have confirmed the pyglet window gets closed, but still doesn't re-open properly, so not really sure what's happening there (keeping a second python instance running doesn't change the result either). |
I've added a PyOpenGL variant, which is more stable but a little harder to install. The main python dependencies are PyOpenGL & PyOpenGL_accellerate, but those are recommended to be installed using a Python Wheel: On top of this, freeglut needs to be included: https://freeglut.sourceforge.net/index.php#download Opening multiple instances is still problematic. As well as copying the actor while the window is open. The base code of the actor currently looks for a sequence of floats at the end of a Socket OSC message, and then attempts to interpret this as positions and/or velocities. The most common conflict is when we have Euler angles and positions in 6 floats, because it might assume these are two sets of positions. Some work needs to be done to guesstimate the exact content, or to expose settings to allow users to control the guess. |
Two further options to try:
|
Don't merge yet, this is a wip-discussion PR...
Current issues:
In order for this to work, you need to pip install the relevant dependencies:
And I had to also install "requests". In windows this needs to be done from the embedded python instance in build/python by using "python -m pip install ...", and then run build_windows.bat so it gets copied to the executable folders.