11 #include <QOpenGLFunctions> 22 QOpenGLFunctions* pFunc =
23 QOpenGLContext::currentContext()->functions();
24 pFunc->glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
30 glMatrixMode(GL_PROJECTION);
32 glViewport(0, 0, (GLint)nWidth, (GLint)nHeight);
33 glOrtho(0, 100, 100, 0, -1, 1);
39 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
virtual void initializeGL()
virtual void resizeGL(int nWidth, int nHeight)