Beispiel #1
0
        /// <summary>
        /// Creates an InstanceFactory used to create new InstanceEntity instances.
        /// </summary>
        /// <param name="source">The mesh data information used to create InstanceEntity instances.</param>
        /// <param name="shader">The shader shared accross all instances</param>
        /// <returns></returns>
        public InstanceFactory CreateInstanceFactory(IInstanceSource source, Effect shader)
        {
            var instanceFactory = new InstanceFactory(SunBurnCoreSystem.Instance.GraphicsDeviceManager.GraphicsDevice, source, shader);
            _instanceFactories.Add(instanceFactory);

            return instanceFactory;
        }
Beispiel #2
0
        /// <summary>
        /// Creates an InstanceFactory used to create new InstanceEntity instances.
        /// </summary>
        /// <param name="source">The mesh data information used to create InstanceEntity instances.</param>
        /// <param name="shader">The shader shared accross all instances</param>
        /// <returns></returns>
        public InstanceFactory CreateInstanceFactory(IInstanceSource source, Effect shader)
        {
            var instanceFactory = new InstanceFactory(SunBurnCoreSystem.Instance.GraphicsDeviceManager.GraphicsDevice, source, shader);

            _instanceFactories.Add(instanceFactory);

            return(instanceFactory);
        }
Beispiel #3
0
 /// <summary>
 ///   Creates a new instance of the class
 /// </summary>
 /// <param name = "graphicsDevice">The GraphicsDevice instance</param>
 /// <param name = "source">The mesh data information used to create instances</param>
 /// <param name = "shader">The shader shared accross all instances</param>
 /// <remarks>
 ///   The provided shader should be either LightingEffect or DeferredObjectEffect and set is Skinned property to true
 /// </remarks>
 protected internal InstanceFactory(GraphicsDevice graphicsDevice, IInstanceSource source, Effect shader)
 {
     _graphicsDevice = graphicsDevice;
     _source = source;
     _shader = shader;
 }
Beispiel #4
0
 public PuttyInstance(IInstanceSource source, string name)
 {
     Name = name;
     Source = source;
 }
Beispiel #5
0
 /// <summary>
 ///   Creates a new instance of the class
 /// </summary>
 /// <param name = "graphicsDevice">The GraphicsDevice instance</param>
 /// <param name = "source">The mesh data information used to create instances</param>
 /// <param name = "shader">The shader shared accross all instances</param>
 /// <remarks>
 ///   The provided shader should be either LightingEffect or DeferredObjectEffect and set is Skinned property to true
 /// </remarks>
 protected internal InstanceFactory(GraphicsDevice graphicsDevice, IInstanceSource source, Effect shader)
 {
     _graphicsDevice = graphicsDevice;
     _source         = source;
     _shader         = shader;
 }