\*-------------------------*/\r
\r
Rippling::Rippling(int w, int h, float dt)\r
+ : w(w), h(h), dt(dt), t(0),\r
+ dg(8, 8, 1),\r
+ db(16, 16, 1),\r
+ title("Rippling Cuda")\r
{\r
assert(w == h);\r
\r
- // Inputs\r
- this->w = w;\r
- this->h = h;\r
- this->dt = dt;\r
-\r
- // Tools\r
- //this->dg = // TODO\r
- //this->db = // TODO\r
- this->t = 0;\r
-\r
- // Outputs\r
- this->title = "Rippling Cuda";\r
-\r
//print(dg, db);\r
Device::assertDim(dg, db);\r
}\r
*/\r
void Rippling::animationStep()\r
{\r
- // TODO\r
+ this->t += dt;\r
}\r
\r
/**\r
*/\r
void Rippling::runGPU(uchar4* ptrDevPixels)\r
{\r
- // TODO lancer le kernel avec <<<dg,db>>>\r
+ rippling<<<dg,db>>>(ptrDevPixels, this->w, this->h, this->t);\r
}\r
\r
/*--------------*\\r