/// <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; }
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); } }
/// <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); }
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); } }
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); } }
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 { } }
/// <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; }