mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Cleanup.
This commit is contained in:
committed by
Branimir Karadžić
parent
d57bc8c46b
commit
80370936d0
@@ -1076,7 +1076,7 @@ int main(int _argc, const char* _argv[])
|
||||
|
||||
delete [] data;
|
||||
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
parseElapsed += now;
|
||||
int64_t convertElapsed = -now;
|
||||
|
||||
@@ -1443,8 +1443,7 @@ int main(int _argc, const char* _argv[])
|
||||
delete [] indexData;
|
||||
delete [] vertexData;
|
||||
|
||||
now = bx::getHPCounter();
|
||||
convertElapsed += now;
|
||||
convertElapsed += bx::getHPCounter();
|
||||
|
||||
bx::printf("parse %f [s]\ntri reorder %f [s]\nconvert %f [s]\ng %d, p %d, v %d, i %d\n"
|
||||
, double(parseElapsed)/bx::getHPFrequency()
|
||||
|
||||
@@ -621,7 +621,7 @@ struct InterpolatorT
|
||||
if (isActive() )
|
||||
{
|
||||
const double freq = double(bx::getHPFrequency() );
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
float time = (float)(double(now - offset) / freq);
|
||||
float lerp = bx::clamp(time, 0.0f, duration) / duration;
|
||||
return lerpT(from, to, easeT(lerp) );
|
||||
@@ -633,7 +633,7 @@ struct InterpolatorT
|
||||
bool isActive() const
|
||||
{
|
||||
const double freq = double(bx::getHPFrequency() );
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
float time = (float)(double(now - offset) / freq);
|
||||
float lerp = bx::clamp(time, 0.0f, duration) / duration;
|
||||
return lerp < 1.0f;
|
||||
@@ -1249,7 +1249,7 @@ int _main_(int _argc, char** _argv)
|
||||
entry::setWindowTitle(entry::kDefaultWindowHandle, title.c_str() );
|
||||
}
|
||||
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
static int64_t last = now;
|
||||
const int64_t frameTime = now - last;
|
||||
last = now;
|
||||
|
||||
@@ -484,7 +484,7 @@ struct View
|
||||
{
|
||||
if (_argc >= 3)
|
||||
{
|
||||
int8_t axis = bx::clamp(bx::toLower(_argv[2][0]) - 'x', 0, 2);
|
||||
int8_t axis = bx::clamp<int8_t>(bx::toLower(_argv[2][0]) - 'x', 0, 2);
|
||||
|
||||
float angle;
|
||||
bx::fromString(&angle, _argv[3]);
|
||||
@@ -1122,7 +1122,7 @@ struct InterpolatorT
|
||||
if (isActive() )
|
||||
{
|
||||
const double freq = double(bx::getHPFrequency() );
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
float time = (float)(double(now - offset) / freq);
|
||||
float lerp = duration != 0.0f ? bx::clamp(time, 0.0f, duration) / duration : 0.0f;
|
||||
return lerpT(from, to, easeT(lerp) );
|
||||
@@ -1136,7 +1136,7 @@ struct InterpolatorT
|
||||
if (0.0f < duration)
|
||||
{
|
||||
const double freq = double(bx::getHPFrequency() );
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
float time = (float)(double(now - offset) / freq);
|
||||
float lerp = bx::clamp(time, 0.0f, duration) / duration;
|
||||
return lerp < 1.0f;
|
||||
@@ -2120,7 +2120,7 @@ int _main_(int _argc, char** _argv)
|
||||
entry::setWindowTitle(entry::kDefaultWindowHandle, title.c_str() );
|
||||
}
|
||||
|
||||
int64_t now = bx::getHPCounter();
|
||||
const int64_t now = bx::getHPCounter();
|
||||
static int64_t last = now;
|
||||
const int64_t frameTime = now - last;
|
||||
last = now;
|
||||
|
||||
Reference in New Issue
Block a user