+ set fix precision for FPS counter
This commit is contained in:
parent
3ff7d569c8
commit
c20e83e0d6
|
@ -1376,11 +1376,13 @@ void View3DInventorViewer::renderScene(void)
|
||||||
(*it)->paintGL();
|
(*it)->paintGL();
|
||||||
|
|
||||||
//fps rendering
|
//fps rendering
|
||||||
if(fpsEnabled) {
|
if (fpsEnabled) {
|
||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
stream << renderTime << " ms / " << 1000./renderTime << " fps";
|
stream.precision(1);
|
||||||
draw2DString(stream.str().c_str(), SbVec2s(10,10), SbVec2f(0.1,0.1));
|
stream.setf(std::ios::fixed | std::ios::showpoint);
|
||||||
};
|
stream << renderTime << " ms / " << 1000./renderTime << " fps";
|
||||||
|
draw2DString(stream.str().c_str(), SbVec2s(10,10), SbVec2f(0.1f,0.1f));
|
||||||
|
}
|
||||||
|
|
||||||
#if 0 // this breaks highlighting of edges
|
#if 0 // this breaks highlighting of edges
|
||||||
glEnable(GL_LIGHTING);
|
glEnable(GL_LIGHTING);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user