Ejemplo n.º 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));
		}
Ejemplo n.º 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)));
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 6
0
 public static GRContext Create(GRBackend backend, IntPtr backendContext, GRContextOptions options)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create(backend, backendContext, ref options)));
 }
Ejemplo n.º 7
0
 public static GRContext Create(GRBackend backend, IntPtr backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create_with_defaults(backend, backendContext)));
 }
Ejemplo n.º 8
0
 public static GRContext Create(GRBackend backend)
 {
     return(Create(backend, IntPtr.Zero));
 }
Ejemplo n.º 9
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext, GRContextOptions options)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create(backend, backendContext.Handle, ref options)));
 }
Ejemplo n.º 10
0
		public static GRContext Create (GRBackend backend, IntPtr backendContext, GRContextOptions options)
		{
			return GetObject<GRContext> (SkiaApi.gr_context_create (backend, backendContext, ref options));
		}
Ejemplo n.º 11
0
		public static GRContext Create (GRBackend backend, IntPtr backendContext)
		{
			return GetObject<GRContext> (SkiaApi.gr_context_create_with_defaults (backend, backendContext));
		}
Ejemplo n.º 12
0
		public static GRContext Create (GRBackend backend)
		{
			return Create (backend, IntPtr.Zero);
		}
Ejemplo n.º 13
0
		public extern static gr_context_t gr_context_create_with_defaults (GRBackend backend, GRBackendContext backendContext);
Ejemplo n.º 14
0
		public extern static gr_context_t gr_context_create (GRBackend backend, GRBackendContext backendContext, ref GRContextOptions options);
Ejemplo n.º 15
0
 internal static GRBackendNative ToNative(this GRBackend backend) =>
 backend switch
 {
Ejemplo n.º 16
0
 public static GRContext Create(GRBackend backend) =>
 backend switch
 {
Ejemplo n.º 17
0
 public static GRContext Create(GRBackend backend, GRGlInterface backendContext)
 {
     return(GetObject <GRContext> (SkiaApi.gr_context_create_with_defaults(backend, backendContext.Handle)));
 }