public override void Serialize(SiliconStudio.Core.Serialization.Contents.ContentSerializerContext context, SerializationStream stream, ref RasterizerState rasterizerState)
 {
     if (context.Mode == ArchiveMode.Serialize)
     {
         var rasterizerStateDescription = rasterizerState.Description;
         stream.Serialize(ref rasterizerStateDescription, context.Mode);
     }
     else
     {
         var rasterizerStateDescription = RasterizerStateDescription.Default;
         stream.Serialize(ref rasterizerStateDescription, context.Mode);
         rasterizerState = new FakeRasterizerState(rasterizerStateDescription);
     }
 }
 public override void Serialize(SiliconStudio.Core.Serialization.Contents.ContentSerializerContext context, SerializationStream stream, ref DepthStencilState depthStencilState)
 {
     if (context.Mode == ArchiveMode.Serialize)
     {
         var depthStencilStateDescription = depthStencilState.Description;
         stream.Serialize(ref depthStencilStateDescription, context.Mode);
     }
     else
     {
         var depthStencilStateDescription = DepthStencilStateDescription.Default;
         stream.Serialize(ref depthStencilStateDescription, context.Mode);
         depthStencilState = new FakeDepthStencilState(depthStencilStateDescription);
     }
 }
Beispiel #3
0
 public override void Serialize(SiliconStudio.Core.Serialization.Contents.ContentSerializerContext context, SerializationStream stream, ref BlendState blendState)
 {
     if (context.Mode == ArchiveMode.Serialize)
     {
         var blendStateDescription = blendState.Description;
         stream.Serialize(ref blendStateDescription, context.Mode);
     }
     else
     {
         var blendStateDescription = BlendStateDescription.Default;
         stream.Serialize(ref blendStateDescription, context.Mode);
         blendState = new FakeBlendState(blendStateDescription);
     }
 }
 public override object Construct(SiliconStudio.Core.Serialization.Contents.ContentSerializerContext context)
 {
     return(null);
 }