-
Notifications
You must be signed in to change notification settings - Fork 105
Update PygameRenderer #372
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
Conversation
fix tab/space key maps update resize refresh meth
|
Hi, Many thanks for this PR!
perfect!
Yes, please move it a level up. Also, please move the file "example_python_backend_pygame.py" to the examples/ folder.
I would be interested in having an example with zengl somewhere inside examples (I did add previously an example with wgpu, in example_python_backend_wgpu.py). At the moment, I have an error when running "bindings/imgui_bundle/python_backends/examples_disabled/example_python_backend_pygame.py": glGetUniformLocation is not available with the default settings of OpenGL on macOS (OpenGL2 is used). See message below This issue can easily be solved by adding these settings in the example: |
Will do!
Sure thing, once we merge this PR and do a release for
Ah of course I forgot about that macOS quirk. I'll add those Will get these updates pushed this evening/tomorrow. Thanks! |
add macos compat flags to example
|
@pthom done :) |
|
I just merged the PR with some small adjustments Thanks! |
|
Awesome, ah yes sorry I forgot those adjustments, thanks for adding! No problem very happy to contribute :) Do you have any ETA on when you might do a release next? (so I can remove the module import monkey patch needed for the zengl-imgui lib) |
Probably around september. |
Fix the issues raised in #369
use ProgrammablePipelineRenderer
Tested with the internal example as well as
pyopengl/moderngl/zenglexamples, and this appears to work fine. UsingFixedPipelineRenderer(after fixing the import path) did not work (raisesOSError: exception: access violation reading 0x0000000000000090), but swapping toProgrammablePipelineRendererI do not see any issues.This also "works" out of the box with ZenGL, but raises an exception when zengl pipelines are created dynamically during run-time, so we'll still need the custom
zengl-imguirenderer (which is fine and why that lib was originally created).fix tab/space key maps
update resize refresh meth
refresh_font_texturemethod no longer exists, calling_update_texturesfrom the base renderer behaves as expected.Let me know if you'd like any further testing or changes. I wonder if we could/should move the
pygame_backendup a level out of the "disabled" backends folder as this appears to me to work well, + remove the comment note at the top of the file?