-
Notifications
You must be signed in to change notification settings - Fork 11
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
Error loading example #2
Comments
Thank you for reporting this. Can you check if changing how we initialize the window, |
Changing the order of imports (including changing when we create the window and the context) appears to make no difference. I tried modifying the configuration in I should mention here that I'm on ARM (M1) and that I haven't used OpenGL that much on this particular machine. I have, however, read that I should be able to use up to I might come back to play around a bit more with other ways of initialising the window - using Qt should demonstrably be an option. Do you have any preferences here? |
Thank you for the feedback. Personally, I prefer to keep examples simple and explicit. simple: window = ....
ctx = zengl.context(...)
# images pipelines ...
while window.alive():
# per frame logic here
# final blit as last I think examples like the above clarify that rendering with zengl is not tight to any type of window or render loop. Most libraries, however, implement the render loop. The current examples use my second best option with an annotated function for the render. I like these a bit less compared to the first option, due to examples cannot modify the global variables from the render loop without a hack or an extra object. My third option is to use classes and inheritance. those examples look bulkier and inheritance causes a lot of issues, so I consider it a bit error-prone. explicit: Please note that all the above is my preference and not a proper guidance on how real-life projects should be structured. I also prefer examples showing pros or cons for architectural decisions like the ones above. I even planned to add some for a pattern I got really convenient applying with moderngl on a large project in the past. I chose the pyglet with the tweaked parameters due I understood that this was the only window that provided OpenGL 3.3 on OSX. I had no access to the computer that was used for testing. A Vulkan 1.0 backend for the complete zengl api is in-progress, this improves headless rendering support and MoltenVK seems to work better on MacOS in general. |
That example manages to open a window but doesn't render anything of note (black background). I get I tried running this and it will fail when loading the shaders regardless of if I try to set the context version or not (using |
To prove that we could try the headless rendering here I prepare some examples soon for testing to be sure which one is the cause. |
I have created a branch with some examples to debug this issue: please run the pygame_* examples. PS: you can install this branch directly with:
|
Do you still want me to test the other ones? As an aside, I also tried used |
Thank you very much for your effort. I think I understand the problem. The single buffer example works because of the glFlush, but it is strange that the double buffer variant is still not working. I sort of expected it so I made the non double buffered example. I have to add a few changes to support the double buffered windows too. There is no need to test the temp_ examples, the problem was the missing flush. Good to hear that glfw + OpenGL 3.3+ runs on M1 too. |
There were two problems:
this is resolved by
and for some reason, if the window is has double buffering enabled and a non zero framebuffer is bound when the swap buffers is called then the screen will be white with a black rectangle on the bottom right corner. |
I ran into this issue while trying out examples. Technically it seems to be a pyglet issue, but since I ran into it while trying out your library you may still want to be aware.
I'm using:
I tested another app that uses pyglet and that loaded up just fine.
The text was updated successfully, but these errors were encountered: