Can't get ids assigned to an attribute in OpenGL
问题 I am trying to have OpenGL automatically assign an ID to a glsl-attribute, but it is failing. My main program: #include <iostream> #include <GL/glew.h> #include <GL/glfw3.h> #include "test.h" #include "shader_utils.h" static void error_callback(int error, const char* description) { std::cout << description << std::endl; } static void key_callback(GLFWwindow* window, int a, int b) { if (a == GLFW_KEY_ESCAPE && b == GLFW_PRESS) { glfwSetWindowShouldClose(window, GL_TRUE); } } void test() { std: