Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multi-Layer Reprojection
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Multi-Layer Reprojection
Commits
fbfecdfb
Commit
fbfecdfb
authored
5 years ago
by
Lava Block
Browse files
Options
Downloads
Patches
Plain Diff
rename to_dt -> to_delta
parent
99e62eed
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
liblava/app/app.cpp
+8
-8
8 additions, 8 deletions
liblava/app/app.cpp
liblava/core/time.hpp
+1
-1
1 addition, 1 deletion
liblava/core/time.hpp
with
9 additions
and
9 deletions
liblava/app/app.cpp
+
8
−
8
View file @
fbfecdfb
...
@@ -355,29 +355,29 @@ void app::update() {
...
@@ -355,29 +355,29 @@ void app::update() {
add_run
([
&
]()
{
add_run
([
&
]()
{
auto
d
elta
=
ms
(
0
);
auto
d
t
=
ms
(
0
);
auto
time
=
now
();
auto
time
=
now
();
if
(
run_time
.
system
!=
time
)
{
if
(
run_time
.
system
!=
time
)
{
d
elta
=
time
-
run_time
.
system
;
d
t
=
time
-
run_time
.
system
;
run_time
.
system
=
time
;
run_time
.
system
=
time
;
}
}
run_time
.
delta
=
d
elta
;
run_time
.
delta
=
d
t
;
if
(
!
run_time
.
paused
)
{
if
(
!
run_time
.
paused
)
{
if
(
run_time
.
use_fix_delta
)
if
(
run_time
.
use_fix_delta
)
d
elta
=
run_time
.
fix_delta
;
d
t
=
run_time
.
fix_delta
;
d
elta
=
to_ms
(
to_sec
(
d
elta
)
*
run_time
.
speed
);
d
t
=
to_ms
(
to_sec
(
d
t
)
*
run_time
.
speed
);
run_time
.
current
+=
d
elta
;
run_time
.
current
+=
d
t
;
}
}
else
else
d
elta
=
ms
(
0
);
d
t
=
ms
(
0
);
return
on_update
?
on_update
(
to_
dt
(
delta
))
:
true
;
return
on_update
?
on_update
(
to_delta
(
dt
))
:
true
;
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
liblava/core/time.hpp
+
1
−
1
View file @
fbfecdfb
...
@@ -20,7 +20,7 @@ using clock = std::chrono::high_resolution_clock;
...
@@ -20,7 +20,7 @@ using clock = std::chrono::high_resolution_clock;
using
time_point
=
clock
::
time_point
;
using
time_point
=
clock
::
time_point
;
using
duration
=
clock
::
duration
;
using
duration
=
clock
::
duration
;
inline
delta
to_d
t
(
milliseconds
ms
)
{
return
ms
.
count
()
/
1000.f
;
}
inline
delta
to_d
elta
(
milliseconds
ms
)
{
return
ms
.
count
()
/
1000.f
;
}
inline
r64
to_sec
(
milliseconds
ms
)
{
return
ms
.
count
()
/
1000.
;
}
inline
r64
to_sec
(
milliseconds
ms
)
{
return
ms
.
count
()
/
1000.
;
}
inline
ms
to_ms
(
delta
dt
)
{
return
ms
(
to_i32
(
dt
*
1000.f
));
}
inline
ms
to_ms
(
delta
dt
)
{
return
ms
(
to_i32
(
dt
*
1000.f
));
}
inline
ms
to_ms
(
r64
sec
)
{
return
ms
(
to_i32
(
sec
*
1000.
));
}
inline
ms
to_ms
(
r64
sec
)
{
return
ms
(
to_i32
(
sec
*
1000.
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment