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