public void Create(Raster.Image image) { this.SetFormat(image); this.Use(); this.Create(image.Pointer); this.UnUse(); }
public void Load(Raster.Image image, Geometry2D.Integer.Point offset) { TextureType type = this.Context.GetTextureType(image); this.Use(); this.Load(image.Pointer, new Geometry2D.Integer.Box(offset, image.Size), type); this.UnUse(); }
void SetFormat(Raster.Image image) { TextureType type; if (image is Raster.Bgra) type = TextureType.Rgba; else if (image is Raster.Bgr) type = TextureType.Rgb; else type = TextureType.Monochrome; this.SetFormat(type, image.Size); }