Hello,

I am working with an qt opengl application which has two textures. One is for video frame display and using second texture for text and images display. Here is the my paingl source code.

void CQtOpenCVViewerGl:aintGL()
{
if( !mSceneChanged )
return;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glActiveTexture(GL_TEXTURE0);
texture->bind();
glActiveTexture(GL_TEXTURE1);
overlay->bind();

texture->setData(QOpenGLTexture::RGB,QOpenGLTexture::UInt8 ,image11.data,Q_NULLPTR);
texture->setMinificationFilter(QOpenGLTexture::Nearest);
texture->setMagnificationFilter(QOpenGLTexture::Linear);

overlay->setData(QOpenGLTexture::RGB,QOpenGLTexture::UInt8 ,OverlayImage.data,Q_NULLPTR);
overlay->setMinificationFilter(QOpenGLTexture::Nearest);
overlay->setMagnificationFilter(QOpenGLTexture::Linear);


// Calculate model view transformation
QMatrix4x4 matrix;
matrix.translate(0.0, 0.0, -5.0);

// Set modelview-projection matrix
program.setUniformValue("mvp_matrix", projection * matrix);

program.setUniformValue("texture", 0);

program.setUniformValue("overlay", 1);

geometries->drawGeometry(&program);

mSceneChanged = false;
}

texture is for video and overlay is for setting images and text. What happens when I try to set image on second texture, It was not showing anything on screen. Both texture allocated equal size and storage. Also I have bind both together before setting data. The texture which display video frame is running constant so, I think paintgl not processing another texture data set. Help will be appreciated.

Thanks,

Tushar