diff options
Diffstat (limited to 'shader.c')
-rw-r--r-- | shader.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -8,7 +8,7 @@ void check_shader(GLuint shader) { glGetShaderiv(shader, GL_COMPILE_STATUS, &success); if (success) return; glGetShaderInfoLog(shader, LOG_MAX, NULL, debug); - die("error: shader compilation failed:\n%s\n", debug); + die("error: shader compilation failed!\n%s", debug); } void check_program(GLuint program) { @@ -17,13 +17,13 @@ void check_program(GLuint program) { glGetProgramiv(program, GL_LINK_STATUS, &success); if (success) return; glGetProgramInfoLog(program, LOG_MAX, NULL, debug); - die("error: shader linking failed:\n%s\n", debug); + die("error: shader linking failed!\n%s", debug); } GLuint load_shader(GLenum type, const char* const src, size_t src_size) { GLuint shader = glCreateShader(type); - glShaderSource(shader, 1, &src, (const int*) &src_size); - glCompileShader(shader); + glShaderBinary(1, &shader, GL_SHADER_BINARY_FORMAT_SPIR_V_ARB, src, src_size); + glSpecializeShaderARB(shader, "main", 0, 0, 0); check_shader(shader); return shader; } |