- //Rippling0Image* ptrRippling0 = Rippling0Provider::createGL();\r
- //Image* ptrRippling = RipplingProvider::createGL();\r
-\r
- ImageFonctionel* ptrFractalMandelbrot = FractalProvider::createGL();\r
-\r
- const bool isAnimation = true;\r
- const bool isSelection = true;\r
-\r
- //GLUTImageViewers rippling0Viewer(ptrRippling0, isAnimation, isSelection, 0, 0);\r
- //GLUTImageViewers ripplingViewer(ptrRippling, isAnimation, isSelection, 10, 10);\r
-\r
- GLUTImageViewers fractalMandelbrotViewer(ptrFractalMandelbrot, true, true, 20, 20);\r
-\r
- GLUTImageViewers::runALL(); // Bloquant, Tant qu'une fenetre est ouverte\r
-\r
- // destruction\r
- //delete ptrRippling0;\r
- //delete ptrRippling;\r
-\r
- delete ptrFractalMandelbrot;\r
+ const string defaultCommand = "demo";\r
+ const string command = args.size() > 0 ? args[0] : defaultCommand;\r
+\r
+ // AutoViewer<Rippling0Image, Rippling0Provider> rippling0(true, true, 10, 10); // Warmup.\r
+\r
+ if (command == "rippling")\r
+ AutoViewer<Image, RipplingProvider> rippling(true, true, 10, 10);\r
+ else if (command == "mandelbrot")\r
+ {\r
+ const bool multiGPU = args.size() >= 2 && args[1] == "--mp";\r
+ Viewer<ImageFonctionel> fractalMandelbrot(MandelbrotProvider::createGL(multiGPU), true, true, 10, 10);\r
+ }\r
+ else if (command == "julia")\r
+ AutoViewer<ImageFonctionel, JuliaProvider> fractalJulia(true, true, 10, 10);\r
+ else if (command == "newton")\r
+ AutoViewer<ImageFonctionel, NewtonProvider> newtown(true, true, 10, 10);\r
+ else if (command == "heat-transfert")\r
+ AutoViewer<Image, HeatTransfertProvider> heatTransfert(true, false, 10, 10);\r
+ else if (command == "raytracing")\r
+ AutoViewer<Image, RayTracingProvider> rayTracing(true, true, 20, 20);\r
+ else if (command == "convolution")\r
+ {\r
+ const string videoPath = args.size() >= 2 ? args[1] : "/media/Data/Video/nasaFHD_short.avi"; // Vidéo par défaut si pas donnée en paramètre.\r
+ Viewer<Image> convolution(ConvolutionProvider::createGL(videoPath), true, true, 10, 10);\r
+ }\r
+ else if (command == "demo")\r
+ {\r
+ Viewer<Image> convolution(ConvolutionProvider::createGL("/media/Data/Video/nasaFHD_short.avi"), true, true, 10, 10, false);\r
+ AutoViewer<Image, RipplingProvider> rippling(true, true, 60, 30, false);\r
+ Viewer<ImageFonctionel> fractalMandelbrot(MandelbrotProvider::createGL(false), true, true, 120, 60, false);\r
+ AutoViewer<ImageFonctionel, JuliaProvider> fractalJulia(true, true, 180, 80, false);\r
+ AutoViewer<ImageFonctionel, NewtonProvider> newtown(true, true, 260, 120, false);\r
+ AutoViewer<Image, HeatTransfertProvider> heatTransfert(true, false, 1200, 300, false);\r
+ AutoViewer<Image, RayTracingProvider> rayTracing(true, true, 200, 80);\r
+ GLUTImageViewers::runALL();\r
+ }\r
+ else\r
+ {\r
+ cout << "Command unknown: " << command << endl;\r
+ }\r