Пример #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));
            }
        }
Пример #2
0
 public static GRContext CreateGl(GRGlInterface backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_make_gl(backendContext == null ? IntPtr.Zero : backendContext.Handle)));
 }