actually before we make the decision on SilkX should we acutally just ship SilkX as SilkX and encour
actually before we make the decision on SilkX should we acutally just ship SilkX as SilkX and encourage people to try it out?
libsilk idea, but I'm just thinking about how I want the user experience to be and it feels like it does indeed necessitate something in Silk.NET.Core that looks similar to PAL2. libsilk// If a "root surface" has already been created, we will use Surface.Current internally to create a "subsurface"
ISurface surface = Surface.CreateNew() // returns ISurfaceBuilder
// requests in order of preference
// equivalent to .RequestSingleton<T>(...) where T is a IComponentBuilder containing a HluComponentType that we use to discriminate (e.g. HluComponentType.Graphics)
.RequestGraphics<IVkSurfaceBuilder>(
ctx => ctx.WithVersion(1, 3)
.WithSupportedInstanceExtensions<Silk.NET.Vulkan.ExtDebugUtils>() // in addition to the ones required to create the surface
.Build()
)
.RequestGraphics<IGLContextBuilder>(
ctx => ctx.WithVersion(4, 3)
.WithProfile(OpenGLProfile.Core)
.Build()
)
.Build();
// equivalent to .Singleton(HluComponentType.Graphics)
surface.Graphics() switch
{
IGLContext ctx => Console.WriteLine("Using OpenGL"),
IVkSurface surf => Console.WriteLine("Using Vulkan"),
_ => throw new("no requests were able to be fulfilled")
};