mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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(),
|
shadow.texture.left(), shadow.texture.top(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(0, coords, sizeof(coords));
|
_contentBuffer->write(0, coords, sizeof(coords));
|
||||||
|
|
||||||
const auto bottomShadowArea = QRect(
|
const auto bottomShadowArea = QRect(
|
||||||
|
|
|
@ -783,6 +783,7 @@ void Viewport::RendererGL::paintTile(
|
||||||
: &*_frameProgram.yuv420;
|
: &*_frameProgram.yuv420;
|
||||||
const auto uniformViewport = QSizeF(_viewport) * _factor;
|
const auto uniformViewport = QSizeF(_viewport) * _factor;
|
||||||
|
|
||||||
|
program->bind();
|
||||||
program->setUniformValue("viewport", uniformViewport);
|
program->setUniformValue("viewport", uniformViewport);
|
||||||
program->setUniformValue(
|
program->setUniformValue(
|
||||||
"frameBg",
|
"frameBg",
|
||||||
|
@ -1078,6 +1079,7 @@ void Viewport::RendererGL::drawDownscalePass(
|
||||||
? &*_downscaleProgram.argb32
|
? &*_downscaleProgram.argb32
|
||||||
: &*_downscaleProgram.yuv420;
|
: &*_downscaleProgram.yuv420;
|
||||||
|
|
||||||
|
program->bind();
|
||||||
FillTexturedRectangle(f, program);
|
FillTexturedRectangle(f, program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -544,6 +544,7 @@ void OverlayWidget::RendererGL::paintTransformedContent(
|
||||||
0.f, 0.f,
|
0.f, 0.f,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(0, coords, sizeof(coords));
|
_contentBuffer->write(0, coords, sizeof(coords));
|
||||||
|
|
||||||
program->setUniformValue("viewport", _uniformViewport);
|
program->setUniformValue("viewport", _uniformViewport);
|
||||||
|
@ -712,6 +713,7 @@ void OverlayWidget::RendererGL::paintControl(
|
||||||
};
|
};
|
||||||
_controlsProgram->bind();
|
_controlsProgram->bind();
|
||||||
_controlsProgram->setUniformValue("viewport", _uniformViewport);
|
_controlsProgram->setUniformValue("viewport", _uniformViewport);
|
||||||
|
_contentBuffer->bind();
|
||||||
if (!over.isEmpty() && overOpacity > 0) {
|
if (!over.isEmpty() && overOpacity > 0) {
|
||||||
_contentBuffer->write(
|
_contentBuffer->write(
|
||||||
offset * 4 * sizeof(GLfloat),
|
offset * 4 * sizeof(GLfloat),
|
||||||
|
@ -915,6 +917,7 @@ void OverlayWidget::RendererGL::paintRoundedCorners(int radius) {
|
||||||
const auto offset = kControlsOffset
|
const auto offset = kControlsOffset
|
||||||
+ (kControlsCount * kControlValues) / 4;
|
+ (kControlsCount * kControlValues) / 4;
|
||||||
const auto byteOffset = offset * 4 * sizeof(GLfloat);
|
const auto byteOffset = offset * 4 * sizeof(GLfloat);
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(byteOffset, coords, sizeof(coords));
|
_contentBuffer->write(byteOffset, coords, sizeof(coords));
|
||||||
_roundedCornersProgram->bind();
|
_roundedCornersProgram->bind();
|
||||||
_roundedCornersProgram->setUniformValue("viewport", _uniformViewport);
|
_roundedCornersProgram->setUniformValue("viewport", _uniformViewport);
|
||||||
|
@ -981,6 +984,7 @@ void OverlayWidget::RendererGL::paintStoriesSiblingPart(
|
||||||
+ (6 * 2 * 4) / 4 // rounding
|
+ (6 * 2 * 4) / 4 // rounding
|
||||||
+ (index * 4);
|
+ (index * 4);
|
||||||
const auto byteOffset = offset * 4 * sizeof(GLfloat);
|
const auto byteOffset = offset * 4 * sizeof(GLfloat);
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(byteOffset, coords, sizeof(coords));
|
_contentBuffer->write(byteOffset, coords, sizeof(coords));
|
||||||
|
|
||||||
_controlsProgram->bind();
|
_controlsProgram->bind();
|
||||||
|
@ -1059,6 +1063,7 @@ void OverlayWidget::RendererGL::paintUsingRaster(
|
||||||
geometry.left(), geometry.bottom(),
|
geometry.left(), geometry.bottom(),
|
||||||
textured.texture.left(), textured.texture.top(),
|
textured.texture.left(), textured.texture.top(),
|
||||||
};
|
};
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(
|
_contentBuffer->write(
|
||||||
bufferOffset * 4 * sizeof(GLfloat),
|
bufferOffset * 4 * sizeof(GLfloat),
|
||||||
coords,
|
coords,
|
||||||
|
|
|
@ -427,6 +427,7 @@ void Pip::RendererGL::paintTransformedContent(
|
||||||
(geometry.outer.height() - geometry.inner.y()) * yscale,
|
(geometry.outer.height() - geometry.inner.y()) * yscale,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(0, coords, sizeof(coords));
|
_contentBuffer->write(0, coords, sizeof(coords));
|
||||||
|
|
||||||
const auto rgbaFrame = _chromaSize.isEmpty();
|
const auto rgbaFrame = _chromaSize.isEmpty();
|
||||||
|
@ -588,6 +589,7 @@ void Pip::RendererGL::paintButton(
|
||||||
iconOverRect.texture.right(), iconOverRect.texture.top(),
|
iconOverRect.texture.right(), iconOverRect.texture.top(),
|
||||||
iconOverRect.texture.left(), iconOverRect.texture.top(),
|
iconOverRect.texture.left(), iconOverRect.texture.top(),
|
||||||
};
|
};
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(
|
_contentBuffer->write(
|
||||||
offset * 4 * sizeof(GLfloat),
|
offset * 4 * sizeof(GLfloat),
|
||||||
coords,
|
coords,
|
||||||
|
@ -741,6 +743,7 @@ void Pip::RendererGL::paintUsingRaster(
|
||||||
geometry.left(), geometry.bottom(),
|
geometry.left(), geometry.bottom(),
|
||||||
textured.texture.left(), textured.texture.top(),
|
textured.texture.left(), textured.texture.top(),
|
||||||
};
|
};
|
||||||
|
_contentBuffer->bind();
|
||||||
_contentBuffer->write(
|
_contentBuffer->write(
|
||||||
bufferOffset * 4 * sizeof(GLfloat),
|
bufferOffset * 4 * sizeof(GLfloat),
|
||||||
coords,
|
coords,
|
||||||
|
|
Loading…
Add table
Reference in a new issue