I am currently migrating https://github.com/vlc-qt/vlc-qt code to Qt6, i am done with migration of shader, however I got the following errors
No QSGTexture provided from updateSampledImage(). This is wrong.
Anyone knows how to return QSGTexture in updateSampledImage(), especially using OpenGL as the graphics backend
void VideoMaterialShader::updateSampledImage(RenderState &state,
int binding,
QSGTexture **texture,
QSGMaterial *newMaterial,
QSGMaterial *oldMaterial)
{
std::cout << "+++++++++++++++++++++++ VideoMaterialShader::updateSampledImage() called(binding=" << binding << ")" << std::endl;
std::cout << "+++++++++++++++++++++++ VideoMaterialShader::updateSampledImage() *texture" << *texture << std::endl;
Q_UNUSED(state);
Q_UNUSED(oldMaterial);
if (binding < 1 || binding > 3)
return;
// auto m = static_cast<VideoMaterial *>(newMaterial);
// *texture = m->m_textures[binding - 1].data();
/*
switch (binding) { // the binding for the sampler2Ds in the fragment shader
case 1:
*texture = material->state.texture1;
break;
case 2:
*texture = material->state.texture2;
break;
default:
return;
}
*/
}