Ejemplo n.º 1
0
 public AppearanceSettings()
 {
     PrinterColor               = "Automatic";
     ModelColor                 = "Automatic";
     IconColor                  = "Standard";
     StartFullScreen            = false;
     ShowImproveHelpDialog      = true;
     ShowPrinterMismatchWarning = true;
     ShowAllWarnings            = true;
     ShowRemoveModelWarning     = true;
     UseMultipleModels          = true;
     UpdaterMode                = Updater.UpdateSettings.DownloadNotInstall;
     auto_filament_color        = new Color4(98, 181, 233, byte.MaxValue);
     Units                = SettingsManager.GridUnit.MM;
     RenderMode           = OpenGLRendererObject.OpenGLRenderMode.VBOs;
     AutoDetectModelUnits = true;
     AllowSDOnlyPrinting  = false;
     CaseType             = PrinterSizeProfile.CaseType.ProCase;
 }
Ejemplo n.º 2
0
        public void Draw()
        {
            try
            {
                if (openGLRender != null && openGLRender.RenderMode != OpenGLRendererObject.openGLRenderMode)
                {
                    Delete();
                }

                if (openGLRender == null)
                {
                    Create();
                }

                openGLRender.Draw();
            }
            catch (Exception ex)
            {
                Reset();
                if (OpenGLRendererObject.openGLRenderMode == OpenGLRendererObject.OpenGLRenderMode.ImmediateMode)
                {
                    ++try_count;
                    if (try_count <= 2)
                    {
                        return;
                    }

                    ExceptionForm.ShowExceptionForm(new Exception("VBOObject::Draw::Failure", ex));
                }
                else
                {
                    Reset();
                    OpenGLRendererObject.openGLRenderMode = OpenGLRendererObject.OpenGLRenderMode.ImmediateMode;
                }
            }
        }