作者:jinmeiyy_368 | 来源:互联网 | 2023-09-03 08:08
Library Search Paths - 设置好编译 glfw 库的路径
Header Search Paths - 添加 glfw 头文件路径
other link flag 添加 - -lglfw3
glfw 需要依赖 Cocoa CoreVideo IOKit OpenGL 这4个framework.
测试
直接参考 glfw doc
打印硬件信息:
cout 硬件信息为: endl;
cout OpenGL Vendor: glGetString(GL_VENDOR) endl;
cout OpenGL Renderer: glGetString(GL_RENDERER) endl;
cout OpenGL Version: glGetString(GL_VERSION) endl;
cout GLSL Version: glGetString(GL_SHADING_LANGUAGE_VERSION) endl;
cout ------------------------------------------------------ endl;
解决retinal屏显示:
GLint viewPort[4];
glGetIntegerv(GL_VIEWPORT, viewPort);
glViewport(viewPort[0], viewPort[1], viewPort[2], viewPort[3]);