Example #1
0
        internal void Render(bool largeThumbnail)
        {
            lock (this)
            {
                if (GLCONTROL.InvokeRequired)
                {
                    this.Invoke(new MethodInvoker(delegate { GLCONTROL.MakeCurrent(); }));
                    this._cameraPanY = 200; //default 50 micron

                    switch (this.PrintJob.SelectedPrinter.PrinterXYResolution)
                    {
                    case AtumPrinter.PrinterXYResolutionType.Micron75:
                        break;

                    case AtumPrinter.PrinterXYResolutionType.Micron100:
                        this._cameraZoom = 100;     //change zoom for 100 micron
                        break;
                    }

                    SceneView.RenderAsModelView(GLCONTROL, this._cameraRotationX, this._cameraRotationZ, this._cameraZoom, this._cameraPanX, this._cameraPanY, true, largeThumbnail);
                    ObjectView.DrawObjects(GLCONTROL, this.PrintJob.Material.SupportProfiles[0], true);
                    GLCONTROL.SwapBuffers();
                }
                else
                {
                    GLCONTROL.MakeCurrent();
                    this._cameraPanY = 200; //default 50 micron

                    switch (this.PrintJob.SelectedPrinter.PrinterXYResolution)
                    {
                    case AtumPrinter.PrinterXYResolutionType.Micron75:
                        break;

                    case AtumPrinter.PrinterXYResolutionType.Micron100:
                        this._cameraZoom = 100;     //change zoom for 100 micron
                        break;
                    }

                    SceneView.RenderAsModelView(GLCONTROL, this._cameraRotationX, this._cameraRotationZ, this._cameraZoom, this._cameraPanX, this._cameraPanY, true, largeThumbnail);
                    ObjectView.DrawObjects(GLCONTROL, this.PrintJob.Material.SupportProfiles[0], true);
                    // GLCONTROL.SwapBuffers();
                }
            }
        }