Ejemplo n.º 1
0
        public static GRContext Create(GRBackend backend, IntPtr backendContext)
        {
            switch (backend)
            {
            case GRBackend.Metal:
                throw new NotSupportedException();

            case GRBackend.OpenGL:
                return(GetObject <GRContext> (SkiaApi.gr_context_make_gl(backendContext)));

            case GRBackend.Vulkan:
                throw new NotSupportedException();

            default:
                throw new ArgumentOutOfRangeException(nameof(backend));
            }
        }
Ejemplo n.º 2
0
 public static GRContext CreateGl(GRGlInterface backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_make_gl(backendContext == null ? IntPtr.Zero : backendContext.Handle)));
 }