MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / drawText

Function drawText

cpp/4_CUDA_Libraries/randomFog/randomFog.cpp:248–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void drawText(void)
249{
250 using std::string;
251 using std::stringstream;
252
253 glPushMatrix();
254 glLoadIdentity();
255 glRasterPos2f(-1.2f, 1.2f);
256
257 string infoString;
258 stringstream ss;
259 g_pRng->getInfoString(infoString);
260 ss << " skip1=" << nSkip1;
261 ss << " skip2=" << nSkip2;
262 ss << " skip3=" << nSkip3;
263 ss << " points=" << g_nVerticesPopulated;
264 infoString.append(ss.str());
265
266 for (unsigned int i = 0; i < infoString.size(); i++) {
267 glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, infoString[i]);
268 }
269
270 glPopMatrix();
271}
272
273void reshape(int x, int y)
274{

Callers 1

displayFunction · 0.85

Calls 2

getInfoStringMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected