有没有人成功使用过 glMultiDrawArraysIndirect?我包括最新的 glext.h 但编译器似乎找不到该函数。我需要在包含 glext.h 之前定义一些东西(#define ...)吗?
error: ‘GL_DRAW_INDIRECT_BUFFER’ was not declared in this scope
error: ‘glMultiDrawArraysIndirect’ was not declared in this scope
我正在尝试实现 OpenGL superBible 示例。以下是源代码的片段:
GLuint indirect_draw_buffer;
glGenBuffers(1, &indirect_draw_buffer);
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, indirect_draw_buffer);
glBufferData(GL_DRAW_INDIRECT_BUFFER,
NUM_DRAWS * sizeof(DrawArraysIndirectCommand),
draws,
GL_STATIC_DRAW);
....
// fill the buffers
.....
glMultiDrawArraysIndirect (GL_TRIANGLES, NULL, 3, 0);
我在 Linux 上安装了 Quadro 2000 和最新的驱动程序 (NVidia 319.60)。