Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

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