class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions_ES2
{
Q_OBJECT
public:
explicit GLWidget(QWidget *parent = nullptr);
~GLWidget();
protected:
void initializeGL() override;
void resizeGL(int w, int h) override;
void paintGL() override;
private:
bool m_initialized;
GLuint VBO, VAO;
};
glGenVertexArrays(1, &VAO);
glBindVertexArray(VAO);
离线
查了一下,要OpenGL ES3.x 才支持 glGenVertexArrays, glBindVertexArray
离线