Remove old debug code
This commit is contained in:
parent
4f5bc7b5cd
commit
02b1532fdd
@ -386,43 +386,36 @@ namespace glerminal
|
||||
glCompileShader(fragment_shader);
|
||||
|
||||
int success;
|
||||
char info_log[512] = {};
|
||||
|
||||
// verify compile
|
||||
glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetShaderInfoLog(vertex_shader, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteShader(vertex_shader);
|
||||
glDeleteShader(geometry_shader);
|
||||
glDeleteShader(fragment_shader);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not compile vertex shader: "s + info_log);
|
||||
throw std::runtime_error("Could not compile vertex shader.");
|
||||
}
|
||||
|
||||
glGetShaderiv(geometry_shader, GL_COMPILE_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetShaderInfoLog(geometry_shader, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteShader(vertex_shader);
|
||||
glDeleteShader(geometry_shader);
|
||||
glDeleteShader(fragment_shader);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not compile geometry shader: "s + info_log);
|
||||
throw std::runtime_error("Could not compile geometry shader.");
|
||||
}
|
||||
|
||||
glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetShaderInfoLog(fragment_shader, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteShader(vertex_shader);
|
||||
glDeleteShader(geometry_shader);
|
||||
glDeleteShader(fragment_shader);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not compile fragment shader: "s + info_log);
|
||||
throw std::runtime_error("Could not compile fragment shader.");
|
||||
}
|
||||
|
||||
// link
|
||||
@ -439,11 +432,9 @@ namespace glerminal
|
||||
glGetProgramiv(m_program, GL_LINK_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetProgramInfoLog(m_program, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteProgram(m_program);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not link shader program: "s + info_log);
|
||||
throw std::runtime_error("Could not link shader program.");
|
||||
}
|
||||
|
||||
// setup uniforms
|
||||
@ -470,23 +461,19 @@ namespace glerminal
|
||||
glGetShaderiv(screen_vertex_shader, GL_COMPILE_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetShaderInfoLog(screen_vertex_shader, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteShader(screen_vertex_shader);
|
||||
glDeleteShader(screen_fragment_shader);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not compile screen vertex shader: "s + info_log);
|
||||
throw std::runtime_error("Could not compile screen vertex shader.");
|
||||
}
|
||||
|
||||
glGetShaderiv(screen_fragment_shader, GL_COMPILE_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetShaderInfoLog(screen_fragment_shader, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteShader(screen_vertex_shader);
|
||||
glDeleteShader(screen_fragment_shader);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not compile screen fragment shader: "s + info_log);
|
||||
throw std::runtime_error("Could not compile screen fragment shader.");
|
||||
}
|
||||
|
||||
// link
|
||||
@ -501,11 +488,9 @@ namespace glerminal
|
||||
glGetProgramiv(m_screen_program, GL_LINK_STATUS, &success);
|
||||
if (!success)
|
||||
{
|
||||
glGetProgramInfoLog(m_screen_program, sizeof(info_log) / sizeof(*info_log), nullptr, info_log);
|
||||
glDeleteProgram(m_screen_program);
|
||||
|
||||
using namespace std::string_literals;
|
||||
throw std::runtime_error("Could not link screen shader program: "s + info_log);
|
||||
throw std::runtime_error("Could not link screen shader program.");
|
||||
}
|
||||
|
||||
// setup uniforms later
|
||||
|
Loading…
Reference in New Issue
Block a user