mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 02:17:11 +02:00
commit
8a7f130c5b
2 changed files with 6 additions and 5 deletions
|
@ -111,7 +111,7 @@ void drawText(int x, int y, float scale, float radians, int mono,
|
||||||
glRotated(double(radians * DEGREES_PER_RADIAN), 0.0, 0.0, 1.0);
|
glRotated(double(radians * DEGREES_PER_RADIAN), 0.0, 0.0, 1.0);
|
||||||
glScalef(scale / 0.1f, scale / 0.1f, 1.0f);
|
glScalef(scale / 0.1f, scale / 0.1f, 1.0f);
|
||||||
|
|
||||||
glm::vec4 colorV4 = {color[0], color[1], color[3], 1.0f };
|
glm::vec4 colorV4 = {color[0], color[1], color[2], 1.0f };
|
||||||
textRenderer(mono)->draw(0, 0, string, colorV4);
|
textRenderer(mono)->draw(0, 0, string, colorV4);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,7 +271,7 @@ void Stats::display(
|
||||||
// TODO: the display of these timing details should all be moved to JavaScript
|
// TODO: the display of these timing details should all be moved to JavaScript
|
||||||
if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {
|
if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {
|
||||||
// Timing details...
|
// Timing details...
|
||||||
verticalOffset += STATS_PELS_PER_LINE * 4; // skip 4 lines to be under the other columns
|
verticalOffset += STATS_PELS_PER_LINE * 6; // skip 6 lines to be under the other columns
|
||||||
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font,
|
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font,
|
||||||
"-------------------------------------------------------- Function "
|
"-------------------------------------------------------- Function "
|
||||||
"------------------------------------------------------- --msecs- -calls--", color);
|
"------------------------------------------------------- --msecs- -calls--", color);
|
||||||
|
@ -294,13 +294,14 @@ void Stats::display(
|
||||||
j.toBack();
|
j.toBack();
|
||||||
while (j.hasPrevious()) {
|
while (j.hasPrevious()) {
|
||||||
j.previous();
|
j.previous();
|
||||||
|
QChar noBreakingSpace = QChar::Nbsp;
|
||||||
QString functionName = j.value();
|
QString functionName = j.value();
|
||||||
const PerformanceTimerRecord& record = allRecords.value(functionName);
|
const PerformanceTimerRecord& record = allRecords.value(functionName);
|
||||||
|
|
||||||
QString perfLine = QString("%1: %2 [%3]").
|
QString perfLine = QString("%1: %2 [%3]").
|
||||||
arg(QString(qPrintable(functionName)), 120).
|
arg(QString(qPrintable(functionName)), 120, noBreakingSpace).
|
||||||
arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3).
|
arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3, noBreakingSpace).
|
||||||
arg(record.getCount(), 6);
|
arg((int)record.getCount(), 6, 10, noBreakingSpace);
|
||||||
|
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);
|
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);
|
||||||
|
|
Loading…
Reference in a new issue