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 ReadV8(ByteReader reader) { base.ReadV8(reader); VersionNumber = reader.ReadI16(); if (VersionNumber == 1) { EnableFlag = reader.ReadU32(); EnvMapTextureChannel = reader.ReadI32(); EnvMapReflectivity = reader.ReadF32(); BumpMapTextureChannel = reader.ReadI32(); BumpinessFactor = reader.ReadF32(); BumpMapNormalSpace = reader.ReadU32(); PhongShadingFlag = reader.ReadU32(); ReservedField = reader.ReadU32(); } }
protected override void ReadV9(ByteReader reader) { VersionNumber = reader.ReadI16(); NodeFlagsPMI = reader.ReadU32(); var aCount = reader.ReadI32(); for ( int i = 0; i < aCount; i++ ) { Attributes.Add( reader.ReadI32() ); } }
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 ReadV10(ByteReader reader) { Compression = reader.ReadU32() == 3; CompressedLength = reader.ReadI32(); Algorithm = reader.ReadByte(); base.ReadV10( reader); }
protected override void ReadV8(ByteReader reader) { ObjectID = reader.ReadI32(); StateFlags = reader.ReadByte(); FieldInhibitFlags = reader.ReadU32(); }
public void ReadV8(ByteReader reader) { ParameterName = reader.ReadMbString(); ParameterType = (ParamType) reader.ReadU32(); ValueClass = (ValueClass) reader.ReadU32(); Direction = (Direction) reader.ReadU32(); SemanticBinding = (SemanticBinding) reader.ReadU32(); Variability = (Variability) reader.ReadU32(); Reserved = reader.ReadU32(); for ( int i = 0; i < 16; i++ ) { Value[i] = reader.ReadU32(); } }
protected override void ReadV8(ByteReader reader) { base.ReadV8(reader); VersionNumber = reader.ReadI16(); if (VersionNumber == 1) { ShaderLanguage = (ShaderLanguage)reader.ReadI32(); InlineSourceFlag = reader.ReadU32(); if (InlineSourceFlag == 1) { SourceCode = reader.ReadMbString(); } else { SourceCodeLoc = reader.ReadMbString(); } ShaderParamCount = reader.ReadI32(); for (int i = 0; i < ShaderParamCount; i++) { var p = new ShaderParameter(); p.ReadV8(reader); Parameters.Add(p); } } }
public Vers2ImageFormat(ByteReader reader) { TexCoordGenMode = new int[4]; TexCoordRefPlane = new float[4][]; TextureType = reader.ReadI32(); BorderMode = reader.ReadI32(); MipmapMagnificationFilter = reader.ReadI32(); MipmapMinificationFilter = reader.ReadI32(); SDimenWrapMode = reader.ReadI32(); TDimenWrapMode = reader.ReadI32(); RDimenWrapMode = reader.ReadI32(); BlendType = reader.ReadI32(); InternalCompressionLevel = reader.ReadI32(); BlendColor = reader.ReadRGBA(); BorderColor = reader.ReadRGBA(); TextureTransform = reader.ReadMx4F32(); for ( int i = 0; i < 4; i++ ) { TexCoordGenMode[i] = reader.ReadI32(); } for ( int i = 0; i < 4; i++ ) { TexCoordRefPlane[i] = reader.ReadPlaneF32(); } TextureChannel = reader.ReadI32(); _reserved = reader.ReadU32(); InlineImageStorageFlag = reader.ReadU32(); ImageCount = reader.ReadI32(); }