diff --git a/Telegram/SourceFiles/calls/calls_video_incoming.cpp b/Telegram/SourceFiles/calls/calls_video_incoming.cpp index 9ab16d73d..e1a52ebe9 100644 --- a/Telegram/SourceFiles/calls/calls_video_incoming.cpp +++ b/Telegram/SourceFiles/calls/calls_video_incoming.cpp @@ -331,6 +331,7 @@ void Panel::Incoming::RendererGL::paint( shadow.texture.left(), shadow.texture.top(), }; + _contentBuffer->bind(); _contentBuffer->write(0, coords, sizeof(coords)); const auto bottomShadowArea = QRect( diff --git a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp index 63e5105fa..6f6b07620 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp @@ -783,6 +783,7 @@ void Viewport::RendererGL::paintTile( : &*_frameProgram.yuv420; const auto uniformViewport = QSizeF(_viewport) * _factor; + program->bind(); program->setUniformValue("viewport", uniformViewport); program->setUniformValue( "frameBg", @@ -1078,6 +1079,7 @@ void Viewport::RendererGL::drawDownscalePass( ? &*_downscaleProgram.argb32 : &*_downscaleProgram.yuv420; + program->bind(); FillTexturedRectangle(f, program); } diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp index 31ea35237..99be5557f 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_opengl.cpp @@ -544,6 +544,7 @@ void OverlayWidget::RendererGL::paintTransformedContent( 0.f, 0.f, }; + _contentBuffer->bind(); _contentBuffer->write(0, coords, sizeof(coords)); program->setUniformValue("viewport", _uniformViewport); @@ -712,6 +713,7 @@ void OverlayWidget::RendererGL::paintControl( }; _controlsProgram->bind(); _controlsProgram->setUniformValue("viewport", _uniformViewport); + _contentBuffer->bind(); if (!over.isEmpty() && overOpacity > 0) { _contentBuffer->write( offset * 4 * sizeof(GLfloat), @@ -915,6 +917,7 @@ void OverlayWidget::RendererGL::paintRoundedCorners(int radius) { const auto offset = kControlsOffset + (kControlsCount * kControlValues) / 4; const auto byteOffset = offset * 4 * sizeof(GLfloat); + _contentBuffer->bind(); _contentBuffer->write(byteOffset, coords, sizeof(coords)); _roundedCornersProgram->bind(); _roundedCornersProgram->setUniformValue("viewport", _uniformViewport); @@ -981,6 +984,7 @@ void OverlayWidget::RendererGL::paintStoriesSiblingPart( + (6 * 2 * 4) / 4 // rounding + (index * 4); const auto byteOffset = offset * 4 * sizeof(GLfloat); + _contentBuffer->bind(); _contentBuffer->write(byteOffset, coords, sizeof(coords)); _controlsProgram->bind(); @@ -1059,6 +1063,7 @@ void OverlayWidget::RendererGL::paintUsingRaster( geometry.left(), geometry.bottom(), textured.texture.left(), textured.texture.top(), }; + _contentBuffer->bind(); _contentBuffer->write( bufferOffset * 4 * sizeof(GLfloat), coords, diff --git a/Telegram/SourceFiles/media/view/media_view_pip_opengl.cpp b/Telegram/SourceFiles/media/view/media_view_pip_opengl.cpp index 8e4e8e7c2..f4be398c2 100644 --- a/Telegram/SourceFiles/media/view/media_view_pip_opengl.cpp +++ b/Telegram/SourceFiles/media/view/media_view_pip_opengl.cpp @@ -427,6 +427,7 @@ void Pip::RendererGL::paintTransformedContent( (geometry.outer.height() - geometry.inner.y()) * yscale, }; + _contentBuffer->bind(); _contentBuffer->write(0, coords, sizeof(coords)); const auto rgbaFrame = _chromaSize.isEmpty(); @@ -588,6 +589,7 @@ void Pip::RendererGL::paintButton( iconOverRect.texture.right(), iconOverRect.texture.top(), iconOverRect.texture.left(), iconOverRect.texture.top(), }; + _contentBuffer->bind(); _contentBuffer->write( offset * 4 * sizeof(GLfloat), coords, @@ -741,6 +743,7 @@ void Pip::RendererGL::paintUsingRaster( geometry.left(), geometry.bottom(), textured.texture.left(), textured.texture.top(), }; + _contentBuffer->bind(); _contentBuffer->write( bufferOffset * 4 * sizeof(GLfloat), coords,