Open joecrayne opened 5 years ago
This is strange. I'm not too familiar with the realize
signal and how it should work. I'm thinking that it might be some ordering problem with the showing of widgets (perhaps containers), but I don't know. Are you getting the same problem with widgets other than GLArea
?
From examples for GLArea, the ::realize signal is the logical/typical place to set up the rendering GL state that does not change much so that ::render can more efficiently render the scene and be called frequently for animations. It's the only widget I have in my project currently, so no, I'm not getting the problem otherwise, but that doesn't mean much. I wanted to use gtk over glfw or something more graphics-oriented merely for the freedom of using widgets later if I want them.
Below is the same program written in vanilla gi-gtk and then again using gi-gtk-declarative. The vanilla gtk behaves as expected, outputting "Realized!" to the console. The declarative version fails to trigger the realize signal.
Working vanilla version:
Non-working declarative version:
I first encountered the problem while using the gi-gtk-declarative-app-simple framework as this seems to be the only documented way to use gi-gtk-declarative. (Is that a bug?) But I removed that layer while trying to debug this issue.