]> git.sesse.net Git - nageru/blobdiff - flow.cpp
Add another missing clear.
[nageru] / flow.cpp
index 05ddfcf2bc370c9b5b3109e8a97782bb14287821..4f869cba8de3562717fde4487fee93d70e89d0b9 100644 (file)
--- a/flow.cpp
+++ b/flow.cpp
@@ -913,7 +913,7 @@ void GPUTimers::print()
                for (int i = 0; i < timer.level * 2; ++i) {
                        fprintf(stderr, " ");
                }
-               fprintf(stderr, "%-30s %4.1f ms\n", timer.name.c_str(), (time_end - time_start) / 1e6);
+               fprintf(stderr, "%-30s %4.1f ms\n", timer.name.c_str(), GLint64(time_end - time_start) / 1e6);
        }
 }
 
@@ -1024,6 +1024,7 @@ int main(int argc, char **argv)
        GLuint initial_flow_tex;
        glCreateTextures(GL_TEXTURE_2D, 1, &initial_flow_tex);
        glTextureStorage2D(initial_flow_tex, 1, GL_RG16F, 1, 1);
+       glClearTexImage(initial_flow_tex, 0, GL_RG, GL_FLOAT, nullptr);
        int prev_level_width = 1, prev_level_height = 1;
 
        GLuint prev_level_flow_tex = initial_flow_tex;