/// <summary> /// Constructs a subclass of this object on the stack in your Rhino plug-in's Render() or RenderWindow() implementation. /// </summary> /// <param name="doc">A Rhino document.</param> /// <param name="mode">A command running mode, such as scripted or interactive.</param> /// <param name="plugin">A plug-in.</param> /// <param name="sizeRendering">The width and height of the rendering.</param> /// <param name="caption">The caption to display in the frame window.</param> /// <param name="channels">The color channel or channels.</param> /// <param name="reuseRenderWindow">true if the rendering window should be reused; otherwise, a new one will be instanciated.</param> /// <param name="clearLastRendering">true if the last rendering should be removed.</param> protected RenderPipeline(RhinoDoc doc, Rhino.Commands.RunMode mode, Rhino.PlugIns.PlugIn plugin, System.Drawing.Size sizeRendering, string caption, Rhino.Render.RenderWindow.StandardChannels channels, bool reuseRenderWindow, bool clearLastRendering ) { Debug.Assert(Rhino.PlugIns.RenderPlugIn.RenderCommandContextPointer != IntPtr.Zero); m_serial_number = m_current_serial_number++; m_all_render_pipelines.Add(m_serial_number, this); m_size = sizeRendering; m_channels = channels; m_pSdkRender = UnsafeNativeMethods.Rdk_SdkRender_New(m_serial_number, Rhino.PlugIns.RenderPlugIn.RenderCommandContextPointer, plugin.NonConstPointer(), caption, reuseRenderWindow, clearLastRendering); m_plugin = plugin; UnsafeNativeMethods.Rdk_RenderWindow_Initialize(m_pSdkRender, (int)channels, m_size.Width, m_size.Height); }
/// <summary> /// Constructs a subclass of this object on the stack in your Rhino plug-in's Render() or RenderWindow() implementation. /// </summary> /// <param name="doc">A Rhino document.</param> /// <param name="mode">A command running mode, such as scripted or interactive.</param> /// <param name="plugin">A plug-in.</param> /// <param name="sizeRendering">The width and height of the rendering.</param> /// <param name="caption">The caption to display in the frame window.</param> /// <param name="channels">The color channel or channels.</param> /// <param name="reuseRenderWindow">true if the rendering window should be reused; otherwise, a new one will be instanciated.</param> /// <param name="clearLastRendering">true if the last rendering should be removed.</param> protected RenderPipeline(RhinoDoc doc, Rhino.Commands.RunMode mode, Rhino.PlugIns.PlugIn plugin, System.Drawing.Size sizeRendering, string caption, Rhino.Render.RenderWindow.StandardChannels channels, bool reuseRenderWindow, bool clearLastRendering ) { Debug.Assert(Rhino.PlugIns.RenderPlugIn.RenderCommandContextPointer != IntPtr.Zero); m_serial_number = m_current_serial_number++; m_all_render_pipelines.Add(m_serial_number, this); m_size = sizeRendering; m_channels = channels; m_pSdkRender = UnsafeNativeMethods.Rdk_SdkRender_New(m_serial_number, Rhino.PlugIns.RenderPlugIn.RenderCommandContextPointer, plugin.NonConstPointer(), caption, reuseRenderWindow, clearLastRendering); m_plugin = plugin; UnsafeNativeMethods.Rdk_RenderWindow_Initialize(m_pSdkRender, (int)channels, m_size.Width, m_size.Height); }