shady
shady copied to clipboard
Handle parent window change in shadertoy area properly
With the new implementation of the fullscreen window, the shadertoy area is attached to a new window. This was previously unexpected and there are a few things to fix, for example:
Time is reset, because the realize is send after each window change. After switching between fullscreen and normal a few times with time paused, gtk rendering is stuck. (Maybe render timers are spawned without being stopped?)
A few more things to have a look after: Multipass shaders are reset, i think i have to pass the current frame over main memory in order to fix this, because opengl contexts in gtk are only shared across gdk windows and it does not seem to be possible to make the shadertoy area fullscreen without changing the gdk window. Also the shaders have to be recompiled. The compile time can be lowered by on disk cache or ARB_get_program_binary.