Minor fixes
- Fix uniform name for iFrame - Move timer initialization to main loop, so we don't measure the FBO initialization Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
22b2fd4864
commit
542669ef04
1 changed files with 3 additions and 3 deletions
|
@ -218,12 +218,10 @@ int main(int argc, char **argv)
|
||||||
u_iResolution = glGetUniformLocation(prog, "iResolution");
|
u_iResolution = glGetUniformLocation(prog, "iResolution");
|
||||||
u_iTime = glGetUniformLocation(prog, "iTime");
|
u_iTime = glGetUniformLocation(prog, "iTime");
|
||||||
u_iTimeDelta = glGetUniformLocation(prog, "iTimeDelta");
|
u_iTimeDelta = glGetUniformLocation(prog, "iTimeDelta");
|
||||||
u_iFrame = glGetUniformLocation(prog, "iFrame;");
|
u_iFrame = glGetUniformLocation(prog, "iFrame");
|
||||||
|
|
||||||
glUniform3f(u_iResolution, width, height, 0.0f);
|
glUniform3f(u_iResolution, width, height, 0.0f);
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
|
||||||
|
|
||||||
/******************** framebuffer object ********************/
|
/******************** framebuffer object ********************/
|
||||||
if (to_stdout) {
|
if (to_stdout) {
|
||||||
glGenFramebuffers(1, &fbo);
|
glGenFramebuffers(1, &fbo);
|
||||||
|
@ -244,6 +242,8 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************** drawing loop ********************/
|
/******************** drawing loop ********************/
|
||||||
|
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||||
|
|
||||||
while (to_stdout || window_handle_events()) {
|
while (to_stdout || window_handle_events()) {
|
||||||
/* render image to FBO */
|
/* render image to FBO */
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &frame_start);
|
clock_gettime(CLOCK_MONOTONIC_RAW, &frame_start);
|
||||||
|
|
Loading…
Reference in a new issue