Conversation
|
Thanks for working on this!
I don't think it's necessary. Ideally, GPU rendering should work good for most users, and CPU rendering will be a fallback for some extreme cases. Also, switching rendering without restart will require switching between DrawingArea and GLArea on the fly, that's additional work.
As I understand this example, it renders cairo surface into GL texture of rectangle, maybe we can use the shader from here without changing. |
|
Here are examples of using modernGL with GTK.GlArea and Gtk.DrawingArea. This problem is, I'm not sure if it worth the effort, maybe by using modernGL+Cairo we'll just re-do things that Gtk.DrawingArea automatically does for us and we'll not get any significant performance improvement. If you have time and motivation, feel free to try. I will continue looking for another way to avoid using Cairo at all. |
|
I guess whether we get a performance boost depends on what is actually the bottleneck right now, cairo or CPU. Anyway, I think for as long as we want to keep both CPU and GPU rendering available, we should render using moderngl+cairo, otherwise every new drawing mode will have to be implemented twice. Once we drop CPU rendering, we should probably stop using cairo and turn to something more native in OpenGL/ModernGL. |
Would close #42
Things to work on:
right now, one can't switch between CPU and GPU rendering without closing the app