Example #1
0
		public static GRContext Create (GRBackend backend, GRGlInterface backendContext, GRContextOptions options)
		{
			if (backendContext == null) {
				throw new ArgumentNullException (nameof (backendContext));
			}
			return GetObject<GRContext> (SkiaApi.gr_context_create (backend, backendContext.Handle, ref options));
		}
Example #2
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext, GRContextOptions options)
 {
     if (backendContext == null)
     {
         throw new ArgumentNullException(nameof(backendContext));
     }
     return(GetObject <GRContext> (SkiaApi.gr_context_create(backend, backendContext.Handle, ref options)));
 }
Example #3
0
        public static GRContext Create(GRBackend backend, GRGlInterface backendContext)
        {
            switch (backend)
            {
            case GRBackend.Metal:
                throw new NotSupportedException();

            case GRBackend.OpenGL:
                return(CreateGl(backendContext));

            case GRBackend.Vulkan:
                throw new NotSupportedException();

            default:
                throw new ArgumentOutOfRangeException(nameof(backend));
            }
        }
Example #4
0
 public static GRContext CreateGl(GRGlInterface backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_make_gl(backendContext == null ? IntPtr.Zero : backendContext.Handle)));
 }
Example #5
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext, GRContextOptions options)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create(backend, backendContext.Handle, ref options)));
 }
Example #6
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create_with_defaults(backend, backendContext.Handle)));
 }