diff --git a/src/main.cc b/src/main.cc index c8e7618..87c6427 100644 --- a/src/main.cc +++ b/src/main.cc @@ -119,7 +119,7 @@ int init(App &app) { glGetString(GL_SHADING_LANGUAGE_VERSION) ); - app.offset_modifier = 0.02f; + app.offset_modifier = 0.02f; return EXIT_CODE_SUCCESS; } @@ -234,7 +234,9 @@ void run_main_loop(App &app) { glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); glUseProgram(app.shader_program); - glUniform1f(app.u_offset_idx, app.offset); + if (app.u_offset_idx >= 0) { + glUniform1f(app.u_offset_idx, app.offset); + } // End pre draw setup // Draw call