dc9e211dc980a9ceef9c93793b086cd1417beb76
6 #include "StringTools.h"
8 #include "Rippling0Image.h"
13 /*----------------------------------------------------------------------*\
15 \*---------------------------------------------------------------------*/
17 /*--------------------------------------*\
19 \*-------------------------------------*/
21 extern void launchKernelRippling0(uchar4
* ptrDevPixels
, int w
, int h
, float t
);
23 /*--------------------------------------*\
25 \*-------------------------------------*/
27 /*--------------------------------------*\
29 \*-------------------------------------*/
31 /*----------------------------------------------------------------------*\
33 \*---------------------------------------------------------------------*/
35 /*--------------------------------------*\
37 \*-------------------------------------*/
39 Rippling0Image::Rippling0Image(unsigned int w
, unsigned int h
, float dt
) :
42 assert(getW() == getH()); // image carrer
51 Rippling0Image::~Rippling0Image(void)
56 /*--------------------------------------*\
58 \*-------------------------------------*/
61 * Call automaticly by the api
63 void Rippling0Image::animationStep(bool& isNeedUpdateView
) // Override
66 isNeedUpdateView
= true; // true par default
70 * Call automaticly by the api
72 void Rippling0Image::fillImageGL(uchar4
* ptrDevImageGL
, int w
, int h
) // Override
74 launchKernelRippling0(ptrDevImageGL
, w
, h
, t
);
78 * Call automaticly by the api
80 void Rippling0Image::paintPrimitives(Graphic2Ds
& graphic2D
) // Override
82 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
88 graphic2D
.setColorRGB(r
, g
, b
);
92 string message
= "t = " + StringTools::toString(t
);
93 graphic2D
.drawTitleTop(message
, ptrFont
);
98 graphic2D
.drawTitleBottom("Rippling warmup CUDA", ptrFont
);
102 /*--------------------------------------*\
104 \*-------------------------------------*/
106 /*----------------------------------------------------------------------*\
108 \*---------------------------------------------------------------------*/