- Timestamp:
- 06/10/08 11:05:51 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/CHC_revisited/occquery.cpp
r2746 r2748 353 353 char msg8[100]; 354 354 355 sprintf (msg2, "Traversed: %4d, frustum culled: %4d, query culled: %4d (of %d nodes)",355 sprintf_s(msg2, "Traversed: %4d, frustum culled: %4d, query culled: %4d (of %d nodes)", 356 356 traverser.GetNumTraversedNodes(), traverser.GetNumFrustumCulledNodes(), 357 357 traverser.GetNumQueryCulledNodes(), … … 361 361 char *querystr[2] = {"NV", "ARB"}; 362 362 363 float fps = 1 000.0;363 float fps = 1e3f; 364 364 long renderTime = calcRenderTime(); 365 if (renderTime) fps = 1000000.0f / (float)calcRenderTime();366 367 sprintf (msg3, "Threshold: %4d, algorithm rendering time: %ld ms (%3.3f fps), queries: %s%s",365 if (renderTime) fps = 1e6f / (float)calcRenderTime(); 366 367 sprintf_s(msg3, "Threshold: %4d, algorithm rendering time: %ld ms (%3.3f fps), queries: %s%s", 368 368 traverser.GetVisibilityThreshold(), renderTime / 1000, fps, querystr[useArbQueries], optstr[useOptimization]); 369 369 … … 374 374 calcDecimalPoint(str2, Geometry::CountTriangles(objectType) * numObjects); 375 375 376 sprintf (msg4, "Rendered objects %d (of %d), rendered triangles: %s (of %s)",376 sprintf_s(msg4, "Rendered objects %d (of %d), rendered triangles: %s (of %s)", 377 377 traverser.GetNumRenderedGeometry(), numObjects, str.c_str(), str2.c_str()); 378 378 379 sprintf (msg5, "Next object num: %d", numNextObjects);380 sprintf (msg6, "Next length in z dir: %3.3f", zLength);379 sprintf_s(msg5, "Next object num: %d", numNextObjects); 380 sprintf_s(msg6, "Next length in z dir: %3.3f", zLength); 381 381 382 382 char *objectTypeStr[3] = {"teapot", "torus", "sphere"}; 383 383 384 sprintf (msg7, "Next object type: %s", objectTypeStr[nextObjectType]);385 sprintf (msg8, "Next object size: %3.3f", objectSize);384 sprintf_s(msg7, "Next object type: %s", objectTypeStr[nextObjectType]); 385 sprintf_s(msg8, "Next object size: %3.3f", objectSize); 386 386 387 387 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); … … 836 836 if (numbers.size() > 0) 837 837 { 838 sprintf (hstr, "%d", numbers.back());838 sprintf_s(hstr, "%d", numbers.back()); 839 839 str.append(hstr); 840 840 } … … 842 842 for (size_t i = numbers.size() - 2; i >= 0; i--) 843 843 { 844 sprintf (hstr, ",%03d", numbers[i]);844 sprintf_s(hstr, ",%03d", numbers[i]); 845 845 str.append(hstr); 846 846 }
Note: See TracChangeset
for help on using the changeset viewer.