Files
fall-fever/src/Helper.h

32 lines
688 B
C++

#pragma once
#include <chrono>
#include <glad/gl.h>
#include <stdint.h>
#include <string>
namespace Helper {
void gl_debug_callback(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *message,
const void *userParam);
class Timer
{
public:
Timer(const std::string &name);
~Timer();
private:
std::string m_name;
std::chrono::high_resolution_clock::time_point m_start;
std::chrono::high_resolution_clock::time_point m_end;
std::chrono::duration<float> m_duration;
};
} // namespace Helper