projects
/
vg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various
[vg.git]
/
vg.h
diff --git
a/vg.h
b/vg.h
index f839f02e60e1848573d68c6a52df6467cd64ad36..2acdfc529053caef494352933b74530a909fcb0c 100644
(file)
--- a/
vg.h
+++ b/
vg.h
@@
-141,6
+141,7
@@
struct vg{
/* Runtime */
double time,
/* Runtime */
double time,
+ time_real,
time_delta,
time_rate,
time_delta,
time_rate,
@@
-466,7
+467,7
@@
VG_STATIC void _vg_gameloop_render(void)
vg.samples,
vg.fixed_iterations,
(vg.time_fixed_accumulator/VG_TIMESTEP_FIXED)*100.0f,
vg.samples,
vg.fixed_iterations,
(vg.time_fixed_accumulator/VG_TIMESTEP_FIXED)*100.0f,
- vg.time, vg.time_delta, vg.time_rate,
+ vg.time
_real
, vg.time_delta, vg.time_rate,
vg.time_fixed_extrapolate, vg.time_frame_delta,
vg.time_spinning );
vg.time_fixed_extrapolate, vg.time_frame_delta,
vg.time_spinning );
@@
-557,7
+558,7
@@
VG_STATIC int _vg_crashscreen(void)
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA);
glBlendEquation(GL_FUNC_ADD);
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA);
glBlendEquation(GL_FUNC_ADD);
- glClearColor( 0.15f + sinf(vg.time)*0.1f, 0.0f, 0.0f,1.0f );
+ glClearColor( 0.15f + sinf(vg.time
_real
)*0.1f, 0.0f, 0.0f,1.0f );
glClear( GL_COLOR_BUFFER_BIT );
glViewport( 0,0, vg.window_x, vg.window_y );
glClear( GL_COLOR_BUFFER_BIT );
glViewport( 0,0, vg.window_x, vg.window_y );
@@
-592,6
+593,7
@@
VG_STATIC void _vg_gameloop(void){
enum engine_status status = _vg_engine_status();
enum engine_status status = _vg_engine_status();
+ vg.time_real += vg.time_frame_delta;
vg.time_delta = vg.time_frame_delta * vg.time_rate;
vg.time += vg.time_delta;
vg.time_delta = vg.time_frame_delta * vg.time_rate;
vg.time += vg.time_delta;