30 GLint linked = GL_FALSE;
31 glGetProgramiv(program, GL_LINK_STATUS, &linked);
D;
32 if (linked != GL_TRUE) {
36 glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length);
D;
37 char *buffer = (
char *) malloc(length + 1);
38 glGetProgramInfoLog(program, length, NULL, buffer);
D;
65 GLuint shader = glCreateShader(type);
D;
66 glShaderSource(shader,
FP64 ? 6 : 5,
FP64 ? fp64_sources : fp32_sources, NULL);
D;
67 glCompileShader(shader);
D;
68 glAttachShader(program, shader);
D;
69 glDeleteShader(shader);
D;
83 GLint
compile_program_tf(
const char *name,
const GLchar *vert,
const GLchar *geom,
const GLchar *frag,
int nvaryings,
const GLchar **varyings) {
84 GLint program = glCreateProgram();
D;
89 glTransformFeedbackVaryings(program, nvaryings, varyings, GL_INTERLEAVED_ATTRIBS);
D;
91 glLinkProgram(program);
D;
105 GLint
compile_program(
const char *name,
const GLchar *vert,
const GLchar *geom,
const GLchar *frag) {