kwineffects: Remove GLRenderTarget::{attachTexture,detachTexture}

They're unused and immutable render targets are easier to handle.
This commit is contained in:
Vlad Zahorodnii 2022-02-06 14:02:37 +02:00
parent eea94660dc
commit 383a5cee0b
2 changed files with 0 additions and 47 deletions

View file

@ -1154,40 +1154,6 @@ void GLRenderTarget::blitFromFramebuffer(const QRect &source, const QRect &desti
GLRenderTarget::popRenderTarget();
}
void GLRenderTarget::attachTexture(const GLTexture& target)
{
if (!mValid) {
initFBO();
}
if (mTexture.texture() == target.texture()) {
return;
}
pushRenderTarget(this);
mTexture = target;
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
mTexture.target(), mTexture.texture(), 0);
popRenderTarget();
}
void GLRenderTarget::detachTexture()
{
if (mTexture.isNull()) {
return;
}
pushRenderTarget(this);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
mTexture.target(), 0, 0);
popRenderTarget();
}
// ------------------------------------------------------------------
static const uint16_t indices[] = {

View file

@ -415,19 +415,6 @@ public:
*/
bool disable();
/**
* Sets the target texture
* @param target texture where the scene will be rendered on
* @since 4.8
*/
void attachTexture(const GLTexture& target);
/**
* Detaches the texture that is currently attached to this framebuffer object.
* @since 5.13
*/
void detachTexture();
bool valid() const {
return mValid;
}