glGetString(GL_EXTENSIONS)导致crash

"glGetString() is not deprecated, only the GL_EXTENSIONS argument to it is. There’s a lot of history with people using fixed-size buffers to copy the merged extension string into and having that break when someone releases a new driver, which is what we’re hoping to alleviate in the long term here."

可以使用

GLint n, i;
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
for (i = 0; i < n; i++) {
    printf("%s", glGetStringi(GL_EXTENSIONS, i));
}

 

参考https://community.khronos.org/t/gl-extensions-replacement/55542

转载于:https://www.cnblogs.com/redips-l/p/11530159.html

你可能感兴趣的:(glGetString(GL_EXTENSIONS)导致crash)