Commit 383a5cee authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

kwineffects: Remove GLRenderTarget::{attachTexture,detachTexture}

They're unused and immutable render targets are easier to handle.
parent eea94660
......@@ -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[] = {
......
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment