2018-09-05 06:49:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2018-09-10 01:20:56 +00:00
|
|
|
#include <glm/glm.hpp>
|
|
|
|
|
|
|
|
#define DISPLAY_DIGITS 5
|
|
|
|
|
2018-09-10 15:35:02 +00:00
|
|
|
#define CHECK_GL_ERR() Util::_check_gl_err(__FILE__, __LINE__)
|
|
|
|
|
2018-09-13 17:35:30 +00:00
|
|
|
|
|
|
|
|
2018-09-12 21:03:46 +00:00
|
|
|
namespace charcoal
|
2018-09-05 06:49:02 +00:00
|
|
|
{
|
2018-09-12 21:03:46 +00:00
|
|
|
using namespace glm;
|
|
|
|
|
|
|
|
class Util
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static std::string load_file(const std::string& path);
|
|
|
|
static void set_console_position(short x, short y);
|
|
|
|
static void print_matrix(const mat4& matrix);
|
|
|
|
static void print_vec(const vec2& v);
|
|
|
|
static void print_vec(const vec3& v);
|
|
|
|
static void print_vec(const vec4& v);
|
2018-09-10 15:35:02 +00:00
|
|
|
|
2018-09-12 21:03:46 +00:00
|
|
|
// Use the CHECK_GL_ERR macro unless you know what you are doing with this function
|
|
|
|
static void _check_gl_err(const char* file_name, int line);
|
|
|
|
};
|
|
|
|
}
|