glLinkProgram(glsl_program_num);
check_error();
+ GLint success;
+ glGetProgramiv(glsl_program_num, GL_LINK_STATUS, &success);
+ if (success == GL_FALSE) {
+ GLchar error_log[1024] = {0};
+ glGetProgramInfoLog(glsl_program_num, 1024, NULL, error_log);
+ fprintf(stderr, "Error linking program: %s\n", error_log);
+ exit(1);
+ }
+
if (movit_debug_level == MOVIT_DEBUG_ON) {
// Output shader to a temporary file, for easier debugging.
static int compiled_shader_num = 0;
case GL_RG16F:
format = GL_RG;
break;
- case GL_LUMINANCE8:
- format = GL_LUMINANCE;
+ case GL_R8:
+ format = GL_RED;
break;
default:
// TODO: Add more here as needed.
case GL_RG16F:
bytes_per_pixel = 4;
break;
- case GL_LUMINANCE8:
+ case GL_R8:
bytes_per_pixel = 1;
break;
default: