RayTracing.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 04_RayTracing / provider / RayTracingProvider.cpp
1 #include "RayTracingProvider.h"
2
3 RayTracing* RayTracingProvider::create(int dw, int dh, int dg, int db)
4 {
5 return new RayTracing(dw, dh, dg, db);
6 }
7
8 Image* RayTracingProvider::createGL()
9 {
10
11 const int dw = 16 * 50;
12 const int dh = 16 * 50;
13 const int dg = 32; // 32x32.
14 const int db = 8; // 8x8.
15
16 ColorRGB_01* ptrColorTitre = new ColorRGB_01(255, 255, 255);
17 return new Image(create(dw, dh, dg, db), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
18 }