Important: Please read the Qt Code of Conduct -

[Solved] How to enable the accumulation buffer at QGLWidget?

  • Hello,

    I'm trying to use the accumulation buffer in QGLWidget class, and wrote the following code:

    MainWindow::MainWindow(QWidget *parent) :
    ui(new Ui::MainWindow)

    QGLFormat format = QGLFormat::defaultFormat();
    QGLWidget* testWidget = new QGLWidget(this);


    The problem is, this code always fails at the assertion test. This means the instantiated QGLWidget does not enable the accumulation buffer feature.

    Am I doing something wrong? Any suggestions? Hope someone will help me.

    Qt Creator 3.0.1
    Qt 5.2.1 (Clang 5.0 (Apple), 64 bit)
    MacBook Air (OS X 10.8.5)

    Thank you

  • Your code looks fine. Maybe your graphic driver dont support accumulation buffer - it is legacy feature. Some drivers support it for backward compatibility, some not. Your can check supported OpenGL versions, formats and extensions with utilities like "GLView":

  • Thank you mtrch, I didn't know that the accumulation buffer has been deprecated. That's why my code doesn't work.

Log in to reply