コード例 #1
0
ファイル: GRContext.cs プロジェクト: prepare/HTML-Renderer
		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
ファイル: GRContext.cs プロジェクト: whitemike889/SkiaSharp
        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
ファイル: GRContext.cs プロジェクト: whitemike889/SkiaSharp
        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));
            }
        }
コード例 #5
0
        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
ファイル: GRContext.cs プロジェクト: prepare/HTML-Renderer
		public static GRContext Create (GRBackend backend, IntPtr backendContext, GRContextOptions options)
		{
			return GetObject<GRContext> (SkiaApi.gr_context_create (backend, backendContext, ref options));
		}
コード例 #11
0
ファイル: GRContext.cs プロジェクト: prepare/HTML-Renderer
		public static GRContext Create (GRBackend backend, IntPtr backendContext)
		{
			return GetObject<GRContext> (SkiaApi.gr_context_create_with_defaults (backend, backendContext));
		}
コード例 #12
0
ファイル: GRContext.cs プロジェクト: prepare/HTML-Renderer
		public static GRContext Create (GRBackend backend)
		{
			return Create (backend, IntPtr.Zero);
		}
コード例 #13
0
ファイル: SkiaApi.cs プロジェクト: prepare/HTML-Renderer
		public extern static gr_context_t gr_context_create_with_defaults (GRBackend backend, GRBackendContext backendContext);
コード例 #14
0
ファイル: SkiaApi.cs プロジェクト: prepare/HTML-Renderer
		public extern static gr_context_t gr_context_create (GRBackend backend, GRBackendContext backendContext, ref GRContextOptions options);
コード例 #15
0
ファイル: EnumMappings.cs プロジェクト: ywscr/SkiaSharp
 internal static GRBackendNative ToNative(this GRBackend backend) =>
 backend switch
 {
コード例 #16
0
ファイル: GRContext.cs プロジェクト: Cricle/SkiaSharp
 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)));
 }