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
) :
40 ImageMOOs_A(w
, h
), dt(dt
), t(0)
44 Rippling0Image::~Rippling0Image(void)
49 /*--------------------------------------*\
51 \*-------------------------------------*/
54 * Call automaticly by the api
56 void Rippling0Image::animationStep(bool& isNeedUpdateView
) // Override
59 isNeedUpdateView
= true; // true par default
63 * Call automaticly by the api
65 void Rippling0Image::fillImageGL(uchar4
* ptrDevImageGL
, int w
, int h
) // Override
67 launchKernelRippling0(ptrDevImageGL
, w
, h
, this->t
);
71 * Call automaticly by the api
73 void Rippling0Image::paintPrimitives(Graphic2Ds
& graphic2D
) // Override
75 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
81 graphic2D
.setColorRGB(r
, g
, b
);
85 string message
= "t = " + StringTools::toString(t
);
86 graphic2D
.drawTitleTop(message
, ptrFont
);
91 graphic2D
.drawTitleBottom("Rippling warmup CUDA", ptrFont
);
95 /*--------------------------------------*\
97 \*-------------------------------------*/
99 /*----------------------------------------------------------------------*\
101 \*---------------------------------------------------------------------*/