示例#1
0
        /// <inheritdoc/>
        public override void ConvertToData(SiliconStudio.Core.Serialization.Converters.ConverterContext context, ref SiliconStudio.Paradox.Graphics.Data.ImageFragmentData target, SiliconStudio.Paradox.Graphics.ImageFragment source)
        {
            if (target == null)
            {
                target = new SiliconStudio.Paradox.Graphics.Data.ImageFragmentData();
            }

            target.Name = source.Name;
            context.ConvertToData(ref target.Texture, source.Texture);
            context.ConvertToData(ref target.TextureAlpha, source.TextureAlpha);
            target.Region        = source.Region;
            target.IsTransparent = source.IsTransparent;
            target.Orientation   = source.Orientation;
        }
示例#2
0
        /// <inheritdoc/>
        public override void ConvertToData(SiliconStudio.Core.Serialization.Converters.ConverterContext context, ref SiliconStudio.Paradox.Graphics.Data.IndexBufferBindingData target, SiliconStudio.Paradox.Graphics.IndexBufferBinding source)
        {
            if (target == null)
            {
                target = new SiliconStudio.Paradox.Graphics.Data.IndexBufferBindingData();
            }

            context.ConvertToData(ref target.Buffer, source.Buffer);
            target.Is32Bit = source.Is32Bit;
            target.Offset  = source.Offset;
            target.Count   = source.Count;
        }
示例#3
0
        /// <inheritdoc/>
        public void ConvertToData(SiliconStudio.Core.Serialization.Converters.ConverterContext context, ref SiliconStudio.Paradox.Effects.Cubemap.Data.CubemapSourceComponentData target, SiliconStudio.Paradox.Effects.Cubemap.CubemapSourceComponent source)
        {
            if (target == null)
            {
                target = new SiliconStudio.Paradox.Effects.Cubemap.Data.CubemapSourceComponentData();
            }

            {
                var targetBase = (SiliconStudio.Paradox.EntityModel.Data.EntityComponentData)target;
                var sourceBase = (SiliconStudio.Paradox.EntityModel.EntityComponent)source;
                ConvertToData(context, ref targetBase, sourceBase);
            }

            target.Enabled         = source.Enabled;
            target.IsDynamic       = source.IsDynamic;
            target.Size            = source.Size;
            target.InfinityCubemap = source.InfinityCubemap;
            target.InfluenceRadius = source.InfluenceRadius;
            target.NearPlane       = source.NearPlane;
            target.FarPlane        = source.FarPlane;
            context.ConvertToData(ref target.Texture, source.Texture);
        }