Esempio n. 1
0
 public bool GetGlTextureInfo(out GRGlTextureInfo glInfo)
 {
     fixed(GRGlTextureInfo *g = &glInfo)
     {
         return(SkiaApi.gr_backendtexture_get_gl_textureinfo(Handle, g));
     }
 }
Esempio 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.");
            }
        }
Esempio 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);
        }
Esempio n. 4
0
 public bool GetGlTextureInfo(out GRGlTextureInfo glInfo)
 {
     return(SkiaApi.gr_backendtexture_get_gl_textureinfo(Handle, out glInfo));
 }
Esempio n. 5
0
 public GRBackendTexture(int width, int height, bool mipmapped, GRGlTextureInfo glInfo)
     : this(IntPtr.Zero, true)
 {
     CreateGl(width, height, mipmapped, glInfo);
 }