/// <summary>
 /// Constructs a new <see cref="RenderEnvironment"/> from a <see cref="SimulatedEnvironment"/>.
 /// </summary>
 /// <param name="environment">The environment to create the basic environment from.</param>
 /// <returns>A new basic environment.</returns>
 public static RenderEnvironment NewBasicEnvironment(SimulatedEnvironment environment)
 {
   IntPtr pEnvironment = environment == null ? IntPtr.Zero : environment.ConstPointer();
   NativeRenderEnvironment newEnvironment = FromPointer(UnsafeNativeMethods.Rdk_Globals_NewBasicEnvironment(pEnvironment)) as NativeRenderEnvironment;
   if (newEnvironment != null)
     newEnvironment.AutoDelete = true;
   return newEnvironment;
 }
 public virtual void SimulateEnvironment(ref SimulatedEnvironment simualation, bool isForDataOnly)
 {
     if (IsNativeWrapper())
     {
         UnsafeNativeMethods.Rdk_RenderEnvironment_SimulateEnvironment(NonConstPointer(), simualation.ConstPointer(), isForDataOnly);
     }
     else
     {
         UnsafeNativeMethods.Rdk_RenderEnvironment_CallSimulateEnvironmentBase(NonConstPointer(), simualation.ConstPointer(), isForDataOnly);
     }
 }
        /// <summary>
        /// Constructs a new <see cref="RenderEnvironment"/> from a <see cref="SimulatedEnvironment"/>.
        /// </summary>
        /// <param name="environment">The environment to create the basic environment from.</param>
        /// <returns>A new basic environment.</returns>
        public static RenderEnvironment NewBasicEnvironment(SimulatedEnvironment environment)
        {
            IntPtr pEnvironment = environment == null ? IntPtr.Zero : environment.ConstPointer();
            NativeRenderEnvironment newEnvironment = FromPointer(UnsafeNativeMethods.Rdk_Globals_NewBasicEnvironment(pEnvironment)) as NativeRenderEnvironment;

            if (newEnvironment != null)
            {
                newEnvironment.AutoDelete = true;
            }
            return(newEnvironment);
        }
 public virtual void SimulateEnvironment(ref SimulatedEnvironment simualation, bool isForDataOnly)
 {
   if (IsNativeWrapper())
   {
     UnsafeNativeMethods.Rdk_RenderEnvironment_SimulateEnvironment(NonConstPointer(), simualation.ConstPointer(), isForDataOnly);
   }
   else
   {
     UnsafeNativeMethods.Rdk_RenderEnvironment_CallSimulateEnvironmentBase(NonConstPointer(), simualation.ConstPointer(), isForDataOnly);
   }
 }
 static void OnSimulateEnvironment(int serial_number, IntPtr pSim, int bDataOnly)
 {
   try
   {
     RenderEnvironment texture = RenderContent.FromSerialNumber(serial_number) as RenderEnvironment;
     if (texture != null)
     {
       if (pSim != IntPtr.Zero)
       {
         SimulatedEnvironment sim = new SimulatedEnvironment(pSim);
         texture.SimulateEnvironment(ref sim, 1 == bDataOnly);
       }
     }
   }
   catch
   {
   }
 }
 static void OnSimulateEnvironment(int serial_number, IntPtr pSim, int bDataOnly)
 {
     try
     {
         var texture = FromSerialNumber(serial_number) as RenderEnvironment;
         if (texture != null)
         {
             if (pSim != IntPtr.Zero)
             {
                 var sim = new SimulatedEnvironment(pSim);
                 texture.SimulateEnvironment(ref sim, 1 == bDataOnly);
             }
         }
     }
     catch (Exception exception)
     {
         HostUtils.ExceptionReport(exception);
     }
 }
 static void OnSimulateEnvironment(int serial_number, IntPtr pSim, int bDataOnly)
 {
   try
   {
     var texture = FromSerialNumber(serial_number) as RenderEnvironment;
     if (texture != null)
     {
       if (pSim != IntPtr.Zero)
       {
         var sim = new SimulatedEnvironment(pSim);
         texture.SimulateEnvironment(ref sim, 1 == bDataOnly);
       }
     }
   }
   catch (Exception exception)
   {
     HostUtils.ExceptionReport(exception);
   }
 }
Example #8
0
 /// <summary>
 /// Constructs a new <see cref="RenderEnvironment"/> from a <see cref="SimulatedEnvironment"/>.
 /// </summary>
 /// <param name="environment">The environment to create the basic environment from.</param>
 /// <returns>A new basic environment.</returns>
 public static RenderEnvironment NewBasicEnvironment(SimulatedEnvironment environment)
 {
   NativeRenderEnvironment newEnvironment = RenderContent.FromPointer(UnsafeNativeMethods.Rdk_Globals_NewBasicEnvironment(environment == null ? IntPtr.Zero : environment.ConstPointer())) as NativeRenderEnvironment;
   newEnvironment.AutoDelete = true;
   return newEnvironment;
 }