6 #include "Vague0Image.h"
7 #include "StringTools.h"
12 /*----------------------------------------------------------------------*\
14 \*---------------------------------------------------------------------*/
16 /*--------------------------------------*\
18 \*-------------------------------------*/
20 extern void launchKernelVague0(uchar4
* ptrDevPixels
, int w
, int h
, float t
);
22 /*--------------------------------------*\
24 \*-------------------------------------*/
26 /*--------------------------------------*\
28 \*-------------------------------------*/
30 /*----------------------------------------------------------------------*\
32 \*---------------------------------------------------------------------*/
34 /*--------------------------------------*\
36 \*-------------------------------------*/
38 Vague0Image::Vague0Image(unsigned int w
, unsigned int h
, float dt
) :
39 ImageMOOs_A(w
, h
), dt(dt
), t(0)
41 assert(getW() == getH()); // image carrée
44 Vague0Image::~Vague0Image(void)
49 /*--------------------------------------*\
51 \*-------------------------------------*/
55 * Call automaticly by the api
57 void Vague0Image::animationStep(bool& isNeedUpdateView
)
60 isNeedUpdateView
= true; // true par default
65 * Call automaticly by the api
67 void Vague0Image::fillImageGL(uchar4
* ptrDevImageGL
, int w
, int h
)
69 launchKernelVague0(ptrDevImageGL
, w
, h
, t
);
74 * Call automaticly by the api
76 void Vague0Image::paintPrimitives(Graphic2Ds
& graphic2D
)
78 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
84 graphic2D
.setColorRGB(r
, g
, b
);
88 string message
= "t = " + StringTools::toString(t
);
89 graphic2D
.drawTitleTop(message
, ptrFont
);
94 graphic2D
.drawTitleBottom("[API Image Cuda] : VagueImage warmup CUDA", ptrFont
);
98 /*--------------------------------------*\
100 \*-------------------------------------*/
102 /*----------------------------------------------------------------------*\
104 \*---------------------------------------------------------------------*/