Closed steve02081504 closed 1 month ago
I think I know what happened here, it seems like an Windows+GLFW different behavior than what I expected
Long story short, this line calls an immediate render when any window resize happens, as it might happen before finishing a scene with multiple shaders (and give visual artifacts). The GLFW window is started as hidden, but when deciding the final render resolution it sends a resize signal on Windows when hidden, but not Linux where I develop, and tries to render the shaders before they are compiled (self.program == None
)
I've pushed a commit 8af4de6 that inverts this order, but didn't try yet on Windows
Can you run pip install --upgrade git+https://github.com/BrokenSource/ShaderFlow.git
to use this latest version temporarily, to see if it fixes it?
To revert, pip uninstall shaderflow
and again pip install --force-reinstall broken-source
I will push a wheel soon™ with some other docker fix as well so you can have a working 0.3.2
version
Your fix does work! Another problem is that after I updated and ran it, I found it difficult to resize the window: the aspect ratio seems to be fixed and beyond the screen
Your fix does work!
Great! 👍🏻
I found it difficult to resize the window: the aspect ratio seems to be fixed and beyond the screen
The aspect ratio is indeed fixed to the input image's one, so that no out of bounds edges are rendered on realtime or when exporting to a video. I just noticed there's no easy way to revert it to "dynamic" on the CLI (probably what you're expecting how a window should resize), will think of an way to signal this on the main
function
I'm not limiting real time resizes to the monitor size at the moment, due some recursions errors I couldn't fix (ie. bad logic) at the time, but I can revisit this soon-ish. Though it is limited when you send -w -h
to the main
command
One last thing, I know that on Windows the GUI freezes when resized, here's the related GLFW issue if you found it annoying, not much we can do at the moment, other window backends didn't work as well as GLFW on my testings