X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2FmainGL.cpp;h=b15ca7b3423f9972d57c41cabc8dc25668f2daf9;hb=fd0031be0a39a5d902750affaff6322fcd5229b1;hp=9f1b84aba92cc297e68ab6c09c9f8f8d1f248db7;hpb=7753d7abc9c1cdf90793a2936221aa4951c574b3;p=GPU.git diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp b/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp index 9f1b84a..b15ca7b 100755 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp @@ -13,37 +13,45 @@ using namespace std; #include "FractalProvider.h" #include "NewtonProvider.h" #include "HeatTransfertProvider.h" +#include "RayTracingProvider.h" template class Viewer { private: - TOutput* ptrProvider; + TOutput* ptrOutput; GLUTImageViewers viewer; public: Viewer(bool isAnimation, bool isSelection, int pxFrame, int pyFrame): - ptrProvider(TProvider::createGL()), - viewer(ptrProvider, isAnimation, isSelection, pxFrame, pyFrame) + ptrOutput(TProvider::createGL()), + viewer(ptrOutput, isAnimation, isSelection, pxFrame, pyFrame) + { + } + + Viewer(TOutput* output, bool isAnimation, bool isSelection, int pxFrame, int pyFrame): + ptrOutput(output), + viewer(ptrOutput, isAnimation, isSelection, pxFrame, pyFrame) { } ~Viewer() { - delete this->ptrProvider; + delete this->ptrOutput; } }; int mainGL(void) { - //Viewer rippling0(true, true, 10, 10); - //Viewer rippling0(true, true, 10, 10); - //Viewer fractalMandelbrot(true, true, 20, 20); - //Viewer fractalJulia(true, true, 30, 30); - Viewer newtown(true, true, 20, 20); - //Viewer heatTransfert(true, false, 20, 20); - - GLUTImageViewers::runALL(); // Bloquant, Tant qu'une fenetre est ouverte + // Viewer rippling0(true, true, 10, 10); + // Viewer rippling0(true, true, 10, 10); + Viewer fractalMandelbrot(MandelbrotProvider::createGL(true), true, true, 20, 20); + // Viewer fractalJulia(true, true, 30, 30); + // Viewer newtown(true, true, 20, 20); + // Viewer heatTransfert(true, false, 20, 20); + // Viewer rayTracing(true, true, 20, 20); + + GLUTImageViewers::runALL(); // Bloquant, Tant qu'une fenetre est ouverte. return EXIT_SUCCESS; }