Skip to content

Commit 8e8abc1

Browse files
committed
PenLayer: Drop stamp FBO
1 parent 381b4c8 commit 8e8abc1

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/penlayer.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ PenLayer::~PenLayer()
3737
// Delete vertex array and buffer
3838
m_glF->glDeleteVertexArrays(1, &m_vao);
3939
m_glF->glDeleteBuffers(1, &m_vbo);
40-
41-
// Delete stamp FBO
42-
m_glF->glDeleteFramebuffers(1, &m_stampFbo);
4340
}
4441
}
4542

@@ -110,9 +107,6 @@ void PenLayer::setEngine(libscratchcpp::IEngine *newEngine)
110107

111108
m_glF->glBindVertexArray(0);
112109
m_glF->glBindBuffer(GL_ARRAY_BUFFER, 0);
113-
114-
// Create stamp FBO
115-
m_glF->glGenFramebuffers(1, &m_stampFbo);
116110
}
117111

118112
clear();
@@ -288,16 +282,6 @@ void PenLayer::stamp(IRenderedTarget *target)
288282
m_glF->glEnable(GL_BLEND);
289283
m_glF->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
290284

291-
// Create a FBO for the current texture
292-
m_glF->glBindFramebuffer(GL_FRAMEBUFFER, m_stampFbo);
293-
m_glF->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.handle(), 0);
294-
295-
if (m_glF->glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
296-
qWarning() << "error: framebuffer incomplete (stamp " + target->scratchTarget()->name() + ")";
297-
m_glF->glBindFramebuffer(GL_FRAMEBUFFER, 0);
298-
return;
299-
}
300-
301285
// Set viewport
302286
m_glF->glViewport((stageWidth / 2) + bounds.left() * m_scale, (stageHeight / 2) + bounds.bottom() * m_scale, bounds.width() * m_scale, bounds.height() * m_scale);
303287

src/penlayer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class PenLayer : public IPenLayer
6767
void updateTexture();
6868

6969
static std::unordered_map<libscratchcpp::IEngine *, IPenLayer *> m_projectPenLayers;
70-
static inline GLuint m_stampFbo = 0;
7170
bool m_antialiasingEnabled = true;
7271
libscratchcpp::IEngine *m_engine = nullptr;
7372
bool m_hqPen = false;

0 commit comments

Comments
 (0)