X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2FmainGL.cpp;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2FmainGL.cpp;h=b15ca7b3423f9972d57c41cabc8dc25668f2daf9;hp=fe29a86d8f8d3b4678e7cd2e6a77aa462a8b749b;hb=fd0031be0a39a5d902750affaff6322fcd5229b1;hpb=2fd5d915e8a9de4d957d6031d2d68088784eac3c diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp b/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp index fe29a86..b15ca7b 100755 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp @@ -19,19 +19,25 @@ 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; } }; @@ -39,13 +45,13 @@ int mainGL(void) { // Viewer rippling0(true, true, 10, 10); // Viewer rippling0(true, true, 10, 10); - Viewer fractalMandelbrot(true, true, 20, 20); + 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 + GLUTImageViewers::runALL(); // Bloquant, Tant qu'une fenetre est ouverte. return EXIT_SUCCESS; }