charcoal/OpenGLEngine/Util.h
elipzer a933c19fa9 Got the scene to render.
Need to re-make the builtin version. The problem, again, was caused
by vtables. Need to find a way to make interfaces without virtual
methods to remove the need for vtables. Found a good stackoverflow
article on this.

https://stackoverflow.com/questions/44317289/c-interface-without-virtual-functions

The Positioned, Normaled, Textured, etc. Interfaces should be
re-made using this format.
2018-09-13 13:35:30 -04:00

31 lines
668 B
C++

#pragma once
#include <string>
#include <vector>
#include <glm/glm.hpp>
#define DISPLAY_DIGITS 5
#define CHECK_GL_ERR() Util::_check_gl_err(__FILE__, __LINE__)
namespace charcoal
{
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);
// 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);
};
}