示例#1
0
 /// <summary>
 /// Constructs a new basic texture from a SimulatedTexture.
 /// </summary>
 /// <param name="texture">The texture to create the basic texture from.</param>
 /// <returns>A new render texture.</returns>
 public static RenderTexture NewBitmapTexture(SimulatedTexture texture)
 {
   IntPtr pConstTexture = texture == null ? IntPtr.Zero : texture.ConstPointer();
   NativeRenderTexture newTexture = FromPointer(UnsafeNativeMethods.Rdk_Globals_NewBasicTexture(pConstTexture)) as NativeRenderTexture;
   if (newTexture != null)
     newTexture.AutoDelete = true;
   return newTexture;
 }
示例#2
0
 public virtual void SimulateTexture(ref SimulatedTexture simulation, bool isForDataOnly)
 {
   if (IsNativeWrapper())
   {
     UnsafeNativeMethods.Rdk_RenderTexture_SimulateTexture(NonConstPointer(), simulation.ConstPointer(), isForDataOnly);
   }
   else
   {
     UnsafeNativeMethods.Rdk_RenderTexture_CallSimulateTextureBase(NonConstPointer(), simulation.ConstPointer(), isForDataOnly);
   }
 }
示例#3
0
 public virtual void SimulateTexture(ref SimulatedTexture simulation, bool isForDataOnly)
 {
     if (IsNativeWrapper())
     {
         UnsafeNativeMethods.Rdk_RenderTexture_SimulateTexture(NonConstPointer(), simulation.ConstPointer(), isForDataOnly);
     }
     else
     {
         UnsafeNativeMethods.Rdk_RenderTexture_CallSimulateTextureBase(NonConstPointer(), simulation.ConstPointer(), isForDataOnly);
     }
 }
示例#4
0
        /// <summary>
        /// Constructs a new basic texture from a SimulatedTexture.
        /// </summary>
        /// <param name="texture">The texture to create the basic texture from.</param>
        /// <returns>A new render texture.</returns>
        public static RenderTexture NewBitmapTexture(SimulatedTexture texture)
        {
            IntPtr ptr_const_texture        = texture == null ? IntPtr.Zero : texture.ConstPointer();
            NativeRenderTexture new_texture = FromPointer(UnsafeNativeMethods.Rdk_Globals_NewBasicTexture(ptr_const_texture)) as NativeRenderTexture;

            if (new_texture != null)
            {
                new_texture.AutoDelete = true;
            }
            return(new_texture);
        }
示例#5
0
 static void OnSimulateTexture(int serialNumber, IntPtr pSim, int bDataOnly)
 {
     try
     {
         RenderTexture texture = FromSerialNumber(serialNumber) as RenderTexture;
         if (texture != null)
         {
             if (pSim != IntPtr.Zero)
             {
                 SimulatedTexture sim = new SimulatedTexture(pSim);
                 texture.SimulateTexture(ref sim, 1 == bDataOnly);
             }
         }
     }
     catch (Exception exception)
     {
         HostUtils.ExceptionReport(exception);
     }
 }
示例#6
0
 static void OnSimulateTexture(int serial_number, IntPtr pSim, int bDataOnly)
 {
   try
   {
     RenderTexture texture = RenderContent.FromSerialNumber(serial_number) as RenderTexture;
     if (texture != null)
     {
       if (pSim != IntPtr.Zero)
       {
         SimulatedTexture sim = new SimulatedTexture(pSim);
         texture.SimulateTexture(ref sim, 1 == bDataOnly);
       }
     }
   }
   catch (Exception exception)
   {
     Runtime.HostUtils.ExceptionReport(exception);
   }
 }
示例#7
0
 static void OnSimulateTexture(int serial_number, IntPtr pSim, int bDataOnly)
 {
   try
   {
     RenderTexture texture = RenderContent.FromSerialNumber(serial_number) as RenderTexture;
     if (texture != null)
     {
       if (pSim != IntPtr.Zero)
       {
         SimulatedTexture sim = new SimulatedTexture(pSim);
         texture.SimulateTexture(ref sim, 1 == bDataOnly);
       }
     }
   }
   catch
   {
   }
 }
示例#8
0
 /// <summary>
 /// Constructs a new basic texture from a SimulatedTexture.
 /// </summary>
 /// <param name="texture">The texture to create the basic texture from.</param>
 /// <returns>A new render texture.</returns>
 public static RenderTexture NewBitmapTexture(SimulatedTexture texture)
 {
   NativeRenderTexture newTexture = RenderContent.FromPointer(UnsafeNativeMethods.Rdk_Globals_NewBasicTexture(texture == null ? IntPtr.Zero : texture.ConstPointer())) as NativeRenderTexture;
   newTexture.AutoDelete = true;
   return newTexture;
 }