This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: [opengl]how to show the buffer whitch the glReadPixels caches

Part Number: TDA4VM

hello:

I have a question about the glReadPixels.

I have already cache the buffers by using the glReadPixels.

but when i glTexImage2D and draw this buffer,  it has pvr errors:PVR:(Error): IsTextureConsistent: IMGEGLImage is not consistent [ :0 ]

if i want to see the buffer content, how can i do?

--------------------------------------------------------------------------below is the code------------------------------------------------------------------------------------------------

        glReadPixels(0, 0, 512, 512, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
        if (*(unsigned char*)buffer)
        {
            glBindTexture(GL_TEXTURE_2D, _uiTexAllView);
            glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

        }

......

glActiveTexture(GL_TEXTURE5);

glBindTexture(GL_TEXTURE_2D, _uiTexAllView);

glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);

  • Hello,

    Are you getting this error only when you call glReadPixels? Are you able to display any texture using using buffer and _uiTexAllView? Not sure why EGLImage is being used in this case.

    Regards

    Hemant