public override void Write(Vault vault, BinaryWriter bw)
 {
     _debugNameText = new Text(Class, Field, Collection)
     {
         Value = DebugName
     };
     _debugNameText.Write(vault, bw);
     bw.WriteEnum(CullMode);
     bw.Write(DepthBias);
     bw.Write(ScaleDepthBias);
     bw.Write(ScissorTestEnable);
     bw.Write(PrimitiveResetEnable);
     bw.AlignWriter(4);
     bw.Write(PrimitiveResetIndex);
     ScissorData.Write(vault, bw);
     bw.WriteEnum(FillMode);
     bw.Write(MultiSampleAntialiasEnable);
     bw.AlignWriter(4);
     bw.Write(MultiSampleMask);
     bw.Write(ViewPortEnable);
     bw.Write(HalfPixelOffsetEnable);
     bw.AlignWriter(4);
     bw.WriteEnum(ShadeMode);
     bw.WriteEnum(FrontFace);
 }
 public override void Read(Vault vault, BinaryReader br)
 {
     ScissorData    = new ScissorData(Class, Field, Collection);
     _debugNameText = new Text(Class, Field, Collection);
     _debugNameText.Read(vault, br);
     CullMode             = br.ReadEnum <State_RasterizerCullMode>();
     DepthBias            = br.ReadSingle();
     ScaleDepthBias       = br.ReadSingle();
     ScissorTestEnable    = br.ReadBoolean();
     PrimitiveResetEnable = br.ReadBoolean();
     br.AlignReader(4);
     PrimitiveResetIndex = br.ReadUInt32();
     ScissorData.Read(vault, br);
     FillMode = br.ReadEnum <State_RasterizerFillMode>();
     MultiSampleAntialiasEnable = br.ReadBoolean();
     br.AlignReader(4);
     MultiSampleMask       = br.ReadUInt32();
     ViewPortEnable        = br.ReadBoolean();
     HalfPixelOffsetEnable = br.ReadBoolean();
     br.AlignReader(4);
     ShadeMode = br.ReadEnum <State_RasterizerShadeMode>();
     FrontFace = br.ReadEnum <State_RasterizerFrontFace>();
 }