mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Add missing binds for OpenGL shaders and buffers
This commit is contained in:
parent
ad13048cdc
commit
98b58c1168
4 changed files with 11 additions and 0 deletions
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue