GlFunction(Void, "glGenProgramsNV", [(GLsizei, "n"), Out(Array(GLprogramARB, "n"), "programs")]),
GlFunction(Void, "glGetProgramParameterdvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLdouble), "params")], sideeffects=False),
GlFunction(Void, "glGetProgramParameterfvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
- GlFunction(Void, "glGetProgramivNV", [(GLprogramARB, "id"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
+ GlFunction(Void, "glGetProgramivNV", [(GLprogramARB, "id"), (GLenum, "pname"), (Pointer(GLint), "params")], sideeffects=False),
GlFunction(Void, "glGetProgramStringNV", [(GLprogramARB, "id"), (GLenum, "pname"), (OpaquePointer(GLubyte), "program")], sideeffects=False),
GlFunction(Void, "glGetTrackMatrixivNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
GlFunction(Void, "glGetVertexAttribdvNV", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLdouble), "params")], sideeffects=False),
# glGetError is not allowed inside glBegin/glEnd
print ' glretrace::checkGlError(call);'
+ if function.name in ('glProgramStringARB', 'glProgramStringNV'):
+ print r' GLint error_position = -1;'
+ print r' glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &error_position);'
+ print r' if (error_position != -1) {'
+ print r' const char *error_string = (const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB);'
+ print r' std::cerr << call.no << ": warning: " << error_string << "\n";'
+ print r' }'
+
if function.name == 'glCompileShader':
print r' GLint compile_status = 0;'
print r' glGetShaderiv(shader, GL_COMPILE_STATUS, &compile_status);'
print r' delete [] infoLog;'
print r' }'
+ if function.name == 'glCompileShaderARB':
+ print r' GLint compile_status = 0;'
+ print r' glGetObjectParameterivARB(shaderObj, GL_OBJECT_COMPILE_STATUS_ARB, &compile_status);'
+ print r' if (!compile_status) {'
+ print r' GLint info_log_length = 0;'
+ print r' glGetObjectParameterivARB(shaderObj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_log_length);'
+ print r' GLchar *infoLog = new GLchar[info_log_length];'
+ print r' glGetInfoLogARB(shaderObj, info_log_length, NULL, infoLog);'
+ print r' std::cerr << call.no << ": warning: " << infoLog << "\n";'
+ print r' delete [] infoLog;'
+ print r' }'
+
+ if function.name == 'glLinkProgramARB':
+ print r' GLint link_status = 0;'
+ print r' glGetObjectParameterivARB(programObj, GL_OBJECT_LINK_STATUS_ARB, &link_status);'
+ print r' if (!link_status) {'
+ print r' GLint info_log_length = 0;'
+ print r' glGetObjectParameterivARB(programObj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_log_length);'
+ print r' GLchar *infoLog = new GLchar[info_log_length];'
+ print r' glGetInfoLogARB(programObj, info_log_length, NULL, infoLog);'
+ print r' std::cerr << call.no << ": warning: " << infoLog << "\n";'
+ print r' delete [] infoLog;'
+ print r' }'
+
if function.name == 'glFlush':
print ' if (!glretrace::double_buffer) {'
print ' glretrace::frame_complete(call.no);'