-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Manual GLFW integration #480
Conversation
Yes, the Lines 8 to 60 in 570738c
We also have a test to make sure this works: wgpu-py/tests/test_gui_glfw.py Lines 159 to 163 in 570738c
The |
To respond to your questions:
Yes, some parts. Perhaps we can improve our docs on how this works. The example in this PR will certainly help.
I don't think this is the case.
No. |
I think I can see what your idea is now after having had some more time to play with it. I could implement a minimal Canvas class that exposes only the needed methods, but keep control flow out of it. That's cool. I'll try to do that in this branch next. |
Definitely room to improve the docs in this regard then 😅 |
Well, I think it's just unexpected that the Canvas interface from the gui package defines an API that you must use to work with the rust backend. In essence that means it's actually a type defined by the rust backend, that is implemented by the gui package. That's the unclear part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can get it much more minimal than this.
Direct integration of glfw and wgpu-py without using the wgpu.gui Canvas abstraction/class hierarchy.
This is a demonstration for hardcore users that need total low-level control.
Changes:
examples/triangle_glfw_direct.py
examples/triangle.py
andwgpu/gui/glfw.py
to make some utility code more easily accessible.Background:
Note: I guess another question is if this can be done with a pygfx renderer.