Ticket #4870: GLTeapot-integer-FPS.patch
File GLTeapot-integer-FPS.patch, 650 bytes (added by , 14 years ago) |
---|
-
src/apps/glteapot/FPS.cpp
94 94 FPS::drawCounter(GLfloat frameRate) 95 95 { 96 96 GLfloat pos = 0; 97 int ifps = (int)(frameRate * 10 + 0.5);97 int ifps = (int)(frameRate * 10); 98 98 99 99 int count = 0; 100 100 int number = 10; … … 111 111 break; 112 112 number /= 10; 113 113 } 114 115 pos -= 0.5; 116 glBegin(GL_POINTS); 117 glVertex2f(pos, -0.5); 118 glEnd(); 114 119 115 pos += 0.5; 120 121 drawChar(pos, 0, (ifps / number) % 10);122 pos += 1.5;123 124 116 drawChar(pos, 0, 10); 125 117 pos += 1; 126 118 drawChar(pos, 0, 11);