screencast: Make nvidia use the GLES path

glGetTexImage returns a black image

https://forums.developer.nvidia.com/t/glgetteximage-returns-a-black-image-when-using-a-gbm-backed-egldisplay/273253

Fixes: BUG:476602
wilder/Plasma/6.2
Alessandro Astone 2 years ago
parent 491a5b386b
commit f555c3301e
  1. 4
      src/plugins/screencast/screencastutils.h

@ -59,7 +59,9 @@ static void doGrabTexture(GLTexture *texture, spa_data *spa, spa_video_format fo
}
texture->bind();
if (GLPlatform::instance()->isGLES()) {
// BUG: The nvidia driver fails to glGetTexImage
// Drop driver() == DriverNVidia some time after that's fixed
if (GLPlatform::instance()->isGLES() || GLPlatform::instance()->driver() == Driver_NVidia) {
GLFramebuffer fbo(texture);
GLFramebuffer::pushFramebuffer(&fbo);
glReadPixels(0, 0, size.width(), size.height(), closestGLType(format), GL_UNSIGNED_BYTE, spa->data);

Loading…
Cancel
Save