scenes/opengl: Paint background with alpha 0
In conjunction with a buffer format with alpha channel this allows to have KWin's backdrop transparent to see through to a display layer below. Signed-off-by: Eike Hein <eike.hein@mbition.io>
This commit is contained in:
parent
cb47df4fc4
commit
3733abab2c
1 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ QMatrix4x4 SceneOpenGL::transformation(int mask, const ScreenPaintData &data) co
|
|||
void SceneOpenGL::paintBackground(const QRegion ®ion)
|
||||
{
|
||||
if (region == infiniteRegion()) {
|
||||
glClearColor(0, 0, 0, 1);
|
||||
glClearColor(0, 0, 0, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
} else if (!region.isEmpty()) {
|
||||
QVector<float> verts;
|
||||
|
@ -294,7 +294,7 @@ void SceneOpenGL::doPaintBackground(const QVector< float >& vertices)
|
|||
{
|
||||
GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer();
|
||||
vbo->reset();
|
||||
vbo->setUseColor(true);
|
||||
vbo->setColor(QColor(0, 0, 0, 0));
|
||||
vbo->setData(vertices.count() / 2, 2, vertices.data(), nullptr);
|
||||
|
||||
ShaderBinder binder(ShaderTrait::UniformColor);
|
||||
|
|
Loading…
Reference in a new issue