问题1:
QT编译错误:undefined reference to `__imp_gl*
解决方案
在工程*.pro文件中加入
win32:LIBS += -lOpengl32 \
-lglu32
win32-msvc{
LIBS += opengl32.lib \
glu32.lib \
glut.lib
}
问题2:
解决方案:
改变变量名称:
改为:
void SetUpProjection(float fovInDegrees, float nearPlaneWidth,
float nearPlaneHeight, float n = 0.1f,
float f = 1000.f) {
fov_ = fovInDegrees;
near_plane_width_ = nearPlaneWidth;
near_plane_height_ = nearPlaneHeight;
near_plane_ = n;
far_plane_ = f;
}
结果: