RayTracing.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 04_RayTracing / provider / RayTracingProvider.cpp
index 2d82571..aa2e287 100644 (file)
@@ -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);
     }
 
 Image* RayTracingProvider::createGL()
     {
+
+    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(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
+    return new Image(create(dw, dh, dg, db), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
     }