private void ReadV8(ByteReader reader) { VersionNumber = reader.ReadI16(); NormalBinding = (Binding)reader.ReadByte(); TextureCoordBinding = (Binding)reader.ReadByte(); ColorBinding = (Binding)reader.ReadByte(); QuantizationParameters = new QuantizationParameters(reader); }
public Vers1ImageFormat(ByteReader reader) { ImageTexelData = new List<byte>(); _numBytes = reader.ReadI32(); if ( _numBytes > 0 ) { PixelFormat = reader.ReadU32(); PixelDataType = reader.ReadU32(); Dimensionality = reader.ReadI16(); Width = reader.ReadI32(); Height = reader.ReadI32(); MipmapsFlag = reader.ReadU32(); SharedImageFlag = reader.ReadU32(); for ( int i = 0; i < _numBytes; i++ ) { ImageTexelData.Add( reader.ReadByte() ); } MipmapMagnificationFilter = reader.ReadI32(); MipmapMinificationFilter = reader.ReadI32(); SDimenWrapMode = reader.ReadI32(); TDimenWrapMode = reader.ReadI32(); TextureFunctionData = reader.ReadI32(); BlendColor = reader.ReadRGBA(); TextureTransform = reader.ReadMx4F32(); } }
protected override void ReadV10(ByteReader reader) { VersionNumber = reader.ReadByte(); NodeFlagsPMI = reader.ReadU32(); var aCount = reader.ReadI32(); for (int i = 0; i < aCount; i++) { Attributes.Add(reader.ReadI32()); } }
protected override void ReadV10(ByteReader reader) { Length = reader.ReadI32(); ObjectTypeID = reader.ReadGuid(); ObjectBaseType = (ObjectBaseType)reader.ReadByte(); ObjectID = reader.ReadI32(); }
protected override void ReadV9(ByteReader reader) { Compression = reader.ReadI32() == 2; CompressedLength = reader.ReadI32(); Algorithm = reader.ReadByte(); base.ReadV9( reader); }
protected override void ReadV8(ByteReader reader) { Compression = reader.ReadU32() == 2; CompressedLength = reader.ReadI32(); Algorithm = reader.ReadByte(); reader.Inflate(true, CompressedLength - 1); // Decompress the remainder of the header Length = reader.ReadI32(); ObjectTypeID = reader.ReadGuid(); ObjectBaseType = (ObjectBaseType) reader.ReadByte(); }
protected override void ReadV8(ByteReader reader) { Length = reader.ReadI32(); ObjectTypeID = reader.ReadGuid(); if (!ObjectTypeID.Equals(Element.EndOfElements)) ObjectBaseType = (ObjectBaseType)reader.ReadByte(); }
protected override void ReadV8(ByteReader reader) { ObjectID = reader.ReadI32(); StateFlags = reader.ReadByte(); FieldInhibitFlags = reader.ReadU32(); }
/// <summary> /// Default implementation follows the V10 file specification as the most current version available at the time /// of this writing. /// </summary> /// <param name="reader"></param> public void Read(ByteReader reader) { FullVersion = reader.ReadString(80); ByteOrder = reader.ReadByte(); reader.Swap = le != ( ByteOrder == 0 ); if (Version < 9) { ReadV8(reader); } else if (Version < 10) { ReadV9(reader); } else { ReadV10(reader); } }