示例#1
0
 /// <summary>
 /// Clears the current effect on the device.
 /// </summary>
 public void Clear()
 {
     if (CurrentEffectId != Guid.Empty)
     {
         NativeWrapper.DeleteEffect(CurrentEffectId);
     }
 }
示例#2
0
        /// <summary>
        /// Deletes the currently set effect.
        /// </summary>
        internal void DeleteCurrentEffect()
        {
            if (CurrentEffectId == Guid.Empty)
            {
                return;
            }

            NativeWrapper.DeleteEffect(CurrentEffectId);
            CurrentEffectId = Guid.Empty;
        }
示例#3
0
        /// <summary>
        /// Updates the device to use the effect pointed to by the specified GUID.
        /// </summary>
        /// <param name="guid">GUID to set.</param>
        public void SetGuid(Guid guid)
        {
            if (CurrentEffectId != Guid.Empty)
            {
                NativeWrapper.DeleteEffect(CurrentEffectId);
                CurrentEffectId = Guid.Empty;
            }

            NativeWrapper.SetEffect(guid);
            CurrentEffectId = guid;
        }