Replies: 2 comments 1 reply
-
Hi @KnIfER ! Skia is indeed a great option. I remember considering Skia and Agg in the past, but I think I discarded these ideas because they were 2D only and Agg is not being maintained. No one has ever brought it up since then. I imagine it's even more readable if we declare In retrospect, this might have been a bad decision, since the 3D plots we need are quite simple and we can calculate the projection matrices trivially with GLM. In that case, the backends would only need to implement the pure virtual functions for 2D drawing in the interface. The 3D drawing would be delegated to GLM unless they are overridden. That would make new backends much easier to implement. For instance, WxWidgets, Qt, ImGUI have some drawing functions that look like Skia's. I don't think there's any problem allowing a Skia backend (BSD-3) with Matplot++ (MIT) either unless we are modifying Skia, but I'd have to research a little more to be sure. I imagine you have some experience with Skia, right? It should be trivial to replicate the experimental OpenGL 2D line plot with Skia as you did. That would be a great starting point, as all that's missing in that example is text rendering, which should be easy with Skia. If you are interested in getting this started, I'm in. |
Beta Was this translation helpful? Give feedback.
-
The test code for the line plot is here : https://github.com/KnIfER/Textrument-Plugins/blob/main/DirectUILib/SkiaPlotLib/SKiaPlotTest/TestSkiaBackend.cpp You can mix opengl 3d with skia 2d graphics: |
Beta Was this translation helpful? Give feedback.
-
Skia is more flexibel. Skia itself is backed by cpu, opengl, dx ....
The code for skia backend is shorter and more readable.
skia backend / draw_path
Beta Was this translation helpful? Give feedback.
All reactions