Tag: 着色器

无法在OpenGL中将id分配给属性

我试图让OpenGL自动为glsl属性分配一个ID,但它失败了。 我的主要计划: #include #include #include #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::cout << "Starting up" << std::endl; init(); […]