序列化XNA 4.0 RasterizerState [英] Serializing XNA 4.0 RasterizerState

查看:119
本文介绍了序列化XNA 4.0 RasterizerState的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

程序集"Microsoft.Xna.Framework.Graphics,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 842cf8be1de50553"中的类型"Microsoft.Xna.Framework.Graphics.RasterizerState"未标记为可序列化.


Type ''Microsoft.Xna.Framework.Graphics.RasterizerState'' in Assembly ''Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553'' is not marked as serializable.


[Serializable]
public class IBaseGraphicsType
{
   protected RasterizerState RasterizerState_ = new RasterizerState();
   public RasterizerState Rasterizer_State
   {
      get
      {
         return RasterizerState_;
      }
      set
      {
         RasterizerState_ = value;
      }
   }
}




任何想法,我如何可以序列化属于XNA 4.0的RasteriserState?




Any idea how i can serialize the RasteriserState that belongs to XNA 4.0 ?

推荐答案

您将需要自己滚动...对不起..

参考: XmlReader [XmlWriter [ ^ ].



肖恩·哈格雷夫斯(Shawn Hargraves) [ ^ ]在 IntermediateSerializer [他索引的 ^ ]部分
Your going to Need to roll your own... sorry..

References: XmlReader[^], XmlWriter[^].



Shawn Hargraves[^] has a good number of posts in the IntermediateSerializer[^] portion of his Index


这篇关于序列化XNA 4.0 RasterizerState的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆