public ImageTextureCtr(EndianBinaryReader er) : base(er) { TextureImageOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32(); long curpos = er.BaseStream.Position; er.BaseStream.Position = TextureImageOffset; TextureImage = new PixelBasedImageCtr(er); er.BaseStream.Position = curpos; }
public ImageTextureCtr(String Name, Bitmap Tex, Textures.ImageFormat Format) : base() { Type = 0x20000011; this.Name = Name; Width = (uint)Tex.Width; Height = (uint)Tex.Height; HWFormat = Format; GLFormat = GLFormats[(int)Format]; GLType = GLTypes[(int)Format]; NrLevels = 1; TextureImage = new PixelBasedImageCtr(Tex, Format); }