Exemplo n.º 1
0
 public bool GetGlTextureInfo(out GRGlTextureInfo glInfo)
 {
     fixed(GRGlTextureInfo *g = &glInfo)
     {
         return(SkiaApi.gr_backendtexture_get_gl_textureinfo(Handle, g));
     }
 }
Exemplo n.º 2
0
        private void CreateGl(int width, int height, bool mipmapped, GRGlTextureInfo glInfo)
        {
            Handle = SkiaApi.gr_backendtexture_new_gl(width, height, mipmapped, ref glInfo);

            if (Handle == IntPtr.Zero)
            {
                throw new InvalidOperationException("Unable to create a new GRBackendTexture instance.");
            }
        }
Exemplo n.º 3
0
        public GRBackendTexture(GRBackendTextureDesc desc)
            : this(IntPtr.Zero, true)
        {
            var handlePtr = desc.TextureHandle;
            var oldHandle = PtrToStructure <GRTextureInfoObsolete> (handlePtr);

            var handle = new GRGlTextureInfo(oldHandle.fTarget, oldHandle.fID, desc.Config.ToGlSizedFormat());

            CreateGl(desc.Width, desc.Height, false, handle);
        }
Exemplo n.º 4
0
 public bool GetGlTextureInfo(out GRGlTextureInfo glInfo)
 {
     return(SkiaApi.gr_backendtexture_get_gl_textureinfo(Handle, out glInfo));
 }
Exemplo n.º 5
0
 public GRBackendTexture(int width, int height, bool mipmapped, GRGlTextureInfo glInfo)
     : this(IntPtr.Zero, true)
 {
     CreateGl(width, height, mipmapped, glInfo);
 }