mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.43k stars 537 forks source link

[FEATURE] bindings for SkSG (scene graph) module #2365

Open shanemikel opened 1 year ago

shanemikel commented 1 year ago

I am interested in using Skia's SkSG (scene graph) module.

Is there a reason (other than lack of need) SkiaSharp doesn't have bindings for the scene graph module for anything but the InvalidatonController?

How would one go about producing bindings for that module? What are the guidelines on how to map c++ class hierarchies in c#?

shanemikel commented 1 year ago

Looking into the code of the SkSG. It isn't very big, and not that complex. For a nice API and probably better performance, it is probably better for C# apps to implement their own scene graph.

I will probably use it as a design reference instead of binding, though I will be happy to work with anybody else interested to make bindings available anyway. I would like to work through binding a class hierarchy, if only as an exercise.

angelofb commented 1 year ago

@mattleibow https://api.skia.org/namespacesksg.html it would be very useful, are you planning to integrate it into skiasharp?

mattleibow commented 1 year ago

What do you see it being used for?

angelofb commented 1 year ago

hierarchical scene definition, with RenderNodes rendering, grouping, transforming, effects and invalidations

angelofb commented 1 year ago

also i can't find a good 2d scenegraph for c# (not unity and not monogame)