Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
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.


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



Any idea how i can serialize the RasteriserState that belongs to XNA 4.0 ?
Posted
Updated 18-May-11 6:19am
v3

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900