X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fprovider%2FRayTracingProvider.cpp;h=aa2e287878eb8324e108b9d3f1c8663cb98d45eb;hb=1c4b2276e7157acde9a3014b68d5d1667a7d6a44;hp=048678510337e49359418707e6c04ff1648c14c9;hpb=ebdad7dc732d4742d09fd72d312175cb07d27a59;p=GPU.git diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/provider/RayTracingProvider.cpp b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/provider/RayTracingProvider.cpp index 0486785..aa2e287 100644 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/provider/RayTracingProvider.cpp +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/provider/RayTracingProvider.cpp @@ -1,15 +1,18 @@ #include "RayTracingProvider.h" -RayTracing* RayTracingProvider::create() +RayTracing* RayTracingProvider::create(int dw, int dh, int dg, int db) { - int dw = 16 * 50; - int dh = 16 * 50; - - return new RayTracing(dw, dh); + return new RayTracing(dw, dh, dg, db); } -ImageFonctionel* RayTracingProvider::createGL() +Image* RayTracingProvider::createGL() { - ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0); - return new ImageFonctionel(create(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel + + const int dw = 16 * 50; + const int dh = 16 * 50; + const int dg = 32; // 32x32. + const int db = 8; // 8x8. + + ColorRGB_01* ptrColorTitre = new ColorRGB_01(255, 255, 255); + return new Image(create(dw, dh, dg, db), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel }