openGL注意事项

关于显示opengl的版本

const char *version=(const char *)glGetString(GL_VERSION);
printf("%s",version);

以上代码当要检查opengl版本时注意在glfwInit()后和glfwCreateWindow后。否则没有初始化内存出错。
很多时候我们在使用opengl编程时由于版本重多。库也各有不同多数配置不同。在此留档,将会更新此文档。

发布了18 篇原创文章 · 获赞 31 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/alvinlyb/article/details/82934129