16,216
社区成员
发帖
与我相关
我的任务
分享
class CGraphPage : public QGLWidget,protected QOpenGLFunctions
我的类声明,结果glGenVertexArrays,glBindVertexArray
这样的函数没有定义,查了一大堆资料结果发现5.1后才用类似的QOpenGLFunctions_3_0_Core关于版本的纯正类。class CGraphPage : public QGLWidget,protected QOpenGLFunctions_3_0_Core
void CGraphPage::initializeGL()
{
initializeOpenGLFunctions();
glClearColor(0,0.5,1,1);
}
QGLFormat format;
format.setVersion(3,3);
format.setProfile(QGLFormat::CoreProfile);
setFormat(format);