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