c91d361fbeffad001cb2afa4284e9650a1e34214
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
) :
41 assert(getW() == getH()); // image carrer
50 Vague0Image::~Vague0Image(void)
55 /*--------------------------------------*\
57 \*-------------------------------------*/
61 * Call automaticly by the api
63 void Vague0Image::animationStep(bool& isNeedUpdateView
)
66 isNeedUpdateView
= true; // true par default
71 * Call automaticly by the api
73 void Vague0Image::fillImageGL(uchar4
* ptrDevImageGL
, int w
, int h
)
75 launchKernelVague0(ptrDevImageGL
, w
, h
, t
);
80 * Call automaticly by the api
82 void Vague0Image::paintPrimitives(Graphic2Ds
& graphic2D
)
84 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
90 graphic2D
.setColorRGB(r
, g
, b
);
94 string message
= "t = " + StringTools::toString(t
);
95 graphic2D
.drawTitleTop(message
, ptrFont
);
100 graphic2D
.drawTitleBottom("[API Image Cuda] : VagueImage warmup CUDA", ptrFont
);
104 /*--------------------------------------*\
106 \*-------------------------------------*/
108 /*----------------------------------------------------------------------*\
110 \*---------------------------------------------------------------------*/