From 617fec827652d216e2d1e5015f816c4400655d73 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 21 May 2018 21:16:56 +0200 Subject: Abstract texture display buffer, shader --- src/util.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 7aec674..05e9303 100644 --- a/src/util.h +++ b/src/util.h @@ -1,9 +1,16 @@ #pragma once +#include #include namespace util { +double millisecondsSince(std::chrono::time_point& pit) { + return std::chrono::duration_cast( + std::chrono::high_resolution_clock::now() - pit + ).count(); +} + GLint getUniform(GLuint program, const std::string& name) { const GLint uniform = glGetUniformLocation(program, name.c_str()); if ( uniform == -1 ) { -- cgit v1.2.3