/// <summary>
        /// Deserialize the class data from a stream.
        /// </summary>
        /// <param name="reader">The <see cref="T:MySpace.Common.IO.IPrimitiveReader"/> that extracts used to extra data from a stream.</param>
        /// <param name="version">The value of <see cref="P:MySpace.Common.IVersionSerializable.CurrentVersion"/> that was written to the stream when it was originally serialized to a stream;
        /// the version of the <paramref name="reader"/> data.</param>
        public void Deserialize(IPrimitiveReader reader, int version)
        {
            using (reader.CreateRegion())
            {
                //FieldName
                FieldName = reader.ReadString();

                //FilterCaps
                FilterCaps = new FilterCaps();
                Serializer.Deserialize(reader.BaseStream, FilterCaps);
            }
        }
示例#2
0
文件: MainForm.cs 项目: d3x0r/xperdex
        private void InitializeDevice()
        {
            FilterCaps filterCaps = device.DeviceCaps.TextureFilterCaps;

            // If the hardware support it, apply a bilinear filtering
            if (filterCaps.SupportsMagnifyLinear && filterCaps.SupportsMinifyLinear)
            {
                device.SamplerState[0].MinFilter = TextureFilter.Linear;
                device.SamplerState[0].MagFilter = TextureFilter.Linear;
            }
            else
            {
                device.SamplerState[0].MinFilter = TextureFilter.Point;
                device.SamplerState[0].MagFilter = TextureFilter.Point;
            }
        }