mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
buffer mesh working
This commit is contained in:
@@ -78,7 +78,7 @@ namespace cgl {
|
||||
set_source(src);
|
||||
|
||||
if (!compile())
|
||||
throw shader_error(get_info_log());
|
||||
throw shader_error<mode>(get_info_log());
|
||||
}
|
||||
|
||||
static shader<mode> file(const std::string &name) {
|
||||
@@ -188,7 +188,7 @@ namespace cgl {
|
||||
attach(sh);
|
||||
|
||||
if (!link())
|
||||
throw shader_error(get_info_log());
|
||||
throw shader_error<mode>(get_info_log());
|
||||
|
||||
detach(sh);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
explicit gl_error(const char *string) : domain_error(string) {}
|
||||
};
|
||||
|
||||
template<GLenum mode>
|
||||
class shader_error : public gl_error {
|
||||
public:
|
||||
explicit shader_error(const std::string &arg) : gl_error(arg) {}
|
||||
@@ -106,7 +107,7 @@ GLuint utilCompileFiles(const GLenum type, const std::vector<std::string> &files
|
||||
|
||||
if (getShaderCompileStatus(shader)) return shader;
|
||||
|
||||
throw shader_error(getShaderInfoLog(shader));
|
||||
throw shader_error<GL_VERTEX_SHADER>(getShaderInfoLog(shader));
|
||||
}
|
||||
|
||||
GLuint utilLinkProgram(const std::vector<GLuint> &shaders) {
|
||||
|
||||
Reference in New Issue
Block a user