public static void Main(string[] args)
        {
            // Force OpenGL
            AggContext.Config.ProviderTypes.SystemWindow = "MatterHackers.Agg.UI.OpenGLSystemWindow, agg_platform_win32";

            MeshViewerApplication app = new MeshViewerApplication();

            app.ShowAsSystemWindow();
        }
        public static void Main(string[] args)
        {
            // Force OpenGL
            var Glfw = false;

            if (Glfw)
            {
                AggContext.Config.ProviderTypes.SystemWindowProvider = "MatterHackers.GlfwProvider.GlfwWindowProvider, MatterHackers.GlfwProvider";
            }
            else
            {
                AggContext.Config.ProviderTypes.SystemWindowProvider = "MatterHackers.Agg.UI.OpenGLWinformsWindowProvider, agg_platform_win32";
            }

            var downloadsDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");

            List <string> possibleMeshes = new()
            {
                "architest_18.stl",
                "Runout Sensor.stl",
                "Swoop Shell_rev9.STL",
                "Engine-Benchmark.stl"
            };

            possibleMeshes.AddRange(args);

            var meshPath = "";

            foreach (var path in possibleMeshes)
            {
                meshPath = Path.Combine(downloadsDirectory, path);
                if (File.Exists(meshPath))
                {
                    break;
                }
            }

            MeshViewerApplication app = new MeshViewerApplication(true, meshPath);

            SingleWindowProvider.SetWindowTheme(Color.Black, 12, () => new Button("X", 0, 0), 3, Color.LightGray, Color.DarkGray);
            app.ShowAsSystemWindow();
        }
    }
Example #3
0
        public static void Main(string[] args)
        {
            MeshViewerApplication app = new MeshViewerApplication();

            app.ShowAsSystemWindow();
        }
Example #4
0
 public static void Main(string[] args)
 {
     MeshViewerApplication app = new MeshViewerApplication();
     app.ShowAsSystemWindow();
 }