|
|
@@ -19,6 +19,7 @@
|
|
|
#include "scope_guard/scope_guard.hpp"
|
|
|
#include "vector/vector.hpp"
|
|
|
|
|
|
+#include "game/graphics/exception.h"
|
|
|
#include "game/graphics/material.hpp"
|
|
|
#include "game/graphics/shader.hpp"
|
|
|
#include "game/graphics/shader_program.hpp"
|
|
|
@@ -32,10 +33,6 @@ namespace graphics {
|
|
|
extern void print_shader_program_error(GLuint, std::string const &,
|
|
|
std::string const &);
|
|
|
|
|
|
- struct file_read_error : std::runtime_error {
|
|
|
- using std::runtime_error::runtime_error;
|
|
|
- };
|
|
|
-
|
|
|
struct compilation_error : std::runtime_error {
|
|
|
using std::runtime_error::runtime_error;
|
|
|
};
|
|
|
@@ -143,7 +140,7 @@ shader opengl_manager::compile(shaders::type tp,
|
|
|
// 1. Load the vertex shader code (text file) to a new memory buffer
|
|
|
std::string const abs_path = env::resource_file(path);
|
|
|
if (!(buffer = files::load(abs_path))) {
|
|
|
- throw file_read_error("Could not load shader file " + abs_path);
|
|
|
+ throw file_read_error("shader", abs_path);
|
|
|
}
|
|
|
|
|
|
// 2. Create a new shader ID
|