Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QGLBuffer::PixelUnpackBuffer



  • Hi,
    Is there any one having experience on Pixelunpackbuffers. There is too little info on the web about it. THe code below results in NULL for variable ptr. Any ideas why?

    regards

    @
    bool success = mPixelBuffer->create();
    mPixelBuffer->allocate(sizeof(imageData));
    mPixelBuffer->setUsagePattern(QGLBuffer::DynamicDraw);
    mPixelBuffer->bind();
    GLubyte ptr =(GLubyte)mPixelBuffer->map(QGLBuffer::ReadWrite);
    @


Log in to reply