Ejemplo n.º 1
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)
 {
   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;
 }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
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)
        {
            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);
        }
Ejemplo n.º 4
0
 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);
   }
 }
Ejemplo n.º 5
0
 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
   {
   }
 }
Ejemplo n.º 6
0
 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);
     }
 }
Ejemplo n.º 7
0
 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);
   }
 }
Ejemplo n.º 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;
 }