//Constructor public FormatPrefs() { unchecked { pixelLayout = (PixelLayout)0; useMipmaps = MipMapFormat.MIP_FMT_DEFAULT; alphaFormat = AlphaFormat.ALPHA_DEFAULT; } }
/* * Sets the mipmap format of the texture. This indicates whether or not * the textures will use mipmaps which are smaller versions of the texture * that are cached to improve the look of the texture as it is scaled down. * Older texture objects don't seem to have this option, so calling this * function won't affect them. * \param[in] format The new mipmap format for the texture. */ public void SetMipMapFormat(MipMapFormat format) { if (src_tex != null) { src_tex.SetMipMapFormat(format); } //Just silently fail for now. Not sure where this data may or may not be stored in the old style image objects. }
public NiSourceTexture(NiFile niFile) : base(niFile) { useExternal = niFile.Reader.ReadByte(); FileName = niFile.Reader.ReadLengthPrefixedString(); pixelLayout = (PixelLayout)niFile.Reader.ReadInt32(); useMipMaps = (MipMapFormat)niFile.Reader.ReadInt32(); alphaFormat = (AlphaFormat)niFile.Reader.ReadInt32(); isStatic = niFile.Reader.ReadByte(); }
public NiSourceTexture(NIFReader file, BinaryReader reader) : base(file, reader) { IsStatic = true; UseExternal = reader.ReadBoolean(); if (UseExternal) { FileName = new NiString(reader); } if (!UseExternal) { reader.ReadByte(); InternalTexture = new NiRef <ATextureRenderData>(reader); } PixelLayout = (PixelLayout)reader.ReadUInt32(); UseMipmaps = (MipMapFormat)reader.ReadUInt32(); AlphaFormat = (AlphaFormat)reader.ReadUInt32(); IsStatic = reader.ReadBoolean(); Unknown = reader.ReadUInt32(); }