protected static void linkProgram(int program) {
		GL20.glLinkProgram(program);

		String infoLog = GL20.glGetProgramInfoLog(program, GL20.glGetProgram(program, GL20.GL_INFO_LOG_LENGTH));

		if(GL20.glGetProgram(program, GL20.GL_LINK_STATUS) == GL11.GL_FALSE)
			throw new RuntimeException("Failure in linking program. Error log:\n" + infoLog);
		else {
			System.out.println("Linking the program was successful.");
			if(infoLog != null && !(infoLog = infoLog.trim()).isEmpty())
				System.out.println(" Log:\n" + infoLog);
		}
	}