예제 #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));
		}
예제 #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)));
 }
예제 #3
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));
            }
        }
예제 #4
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));
            }
        }
        public GRBackendRenderTarget(GRBackend backend, GRBackendRenderTargetDesc desc)
            : this(IntPtr.Zero, true)
        {
            switch (backend)
            {
            case GRBackend.Metal:
                throw new NotSupportedException();

            case GRBackend.OpenGL:
                var glInfo = new GRGlFramebufferInfo((uint)desc.RenderTargetHandle, desc.Config.ToGlSizedFormat());
                CreateGl(desc.Width, desc.Height, desc.SampleCount, desc.StencilBits, glInfo);
                break;

            case GRBackend.Vulkan:
                throw new NotSupportedException();

            default:
                throw new ArgumentOutOfRangeException(nameof(backend));
            }
        }
예제 #6
0
 public static GRContext Create(GRBackend backend, IntPtr backendContext, GRContextOptions options)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create(backend, backendContext, ref options)));
 }
예제 #7
0
 public static GRContext Create(GRBackend backend, IntPtr backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create_with_defaults(backend, backendContext)));
 }
예제 #8
0
 public static GRContext Create(GRBackend backend)
 {
     return(Create(backend, IntPtr.Zero));
 }
예제 #9
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext, GRContextOptions options)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create(backend, backendContext.Handle, ref options)));
 }
예제 #10
0
		public static GRContext Create (GRBackend backend, IntPtr backendContext, GRContextOptions options)
		{
			return GetObject<GRContext> (SkiaApi.gr_context_create (backend, backendContext, ref options));
		}
예제 #11
0
		public static GRContext Create (GRBackend backend, IntPtr backendContext)
		{
			return GetObject<GRContext> (SkiaApi.gr_context_create_with_defaults (backend, backendContext));
		}
예제 #12
0
		public static GRContext Create (GRBackend backend)
		{
			return Create (backend, IntPtr.Zero);
		}
예제 #13
0
		public extern static gr_context_t gr_context_create_with_defaults (GRBackend backend, GRBackendContext backendContext);
예제 #14
0
		public extern static gr_context_t gr_context_create (GRBackend backend, GRBackendContext backendContext, ref GRContextOptions options);
예제 #15
0
 internal static GRBackendNative ToNative(this GRBackend backend) =>
 backend switch
 {
예제 #16
0
 public static GRContext Create(GRBackend backend) =>
 backend switch
 {
예제 #17
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create_with_defaults(backend, backendContext.Handle)));
 }