diff options
author | Adrian Kummerlaender | 2018-05-21 21:16:56 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2018-05-21 21:20:08 +0200 |
commit | 617fec827652d216e2d1e5015f816c4400655d73 (patch) | |
tree | c2bdce2d375bebc4b7c9907543d57aeb642f7f82 /src/util.h | |
parent | a8feed9d7951c9a947562ed687c704851a31ea9b (diff) | |
download | computicle-617fec827652d216e2d1e5015f816c4400655d73.tar computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.gz computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.bz2 computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.lz computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.xz computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.zst computicle-617fec827652d216e2d1e5015f816c4400655d73.zip |
Abstract texture display buffer, shader
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,9 +1,16 @@ #pragma once +#include <chrono> #include <iostream> namespace util { +double millisecondsSince(std::chrono::time_point<std::chrono::high_resolution_clock>& pit) { + return std::chrono::duration_cast<std::chrono::milliseconds>( + 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 ) { |