Skip to content

Commit 8830473

Browse files
committed
PenLayer: Enable blending in stamp()
1 parent 7a615e7 commit 8830473

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/penlayer.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ void PenLayer::stamp(IRenderedTarget *target)
273273
modelMatrix.scale(scaleX / textureScale, aspectRatio * scaleY / textureScale);
274274
m_glF->glDisable(GL_SCISSOR_TEST);
275275
m_glF->glDisable(GL_DEPTH_TEST);
276+
m_glF->glEnable(GL_BLEND);
277+
m_glF->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
276278

277279
// Create a FBO for the current texture
278280
m_glF->glBindFramebuffer(GL_FRAMEBUFFER, m_stampFbo);

test/penlayer/penlayer_test.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ class PenLayerTest : public testing::Test
3030
m_surface.create();
3131
Q_ASSERT(m_surface.isValid());
3232
m_context.makeCurrent(&m_surface);
33-
34-
QOpenGLFunctions glF(&m_context);
35-
glF.initializeOpenGLFunctions();
36-
glF.glEnable(GL_BLEND);
37-
glF.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
3833
}
3934

4035
void TearDown() override

0 commit comments

Comments
 (0)