Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
383a5cee
Commit
383a5cee
authored
Feb 06, 2022
by
Vlad Zahorodnii
Browse files
kwineffects: Remove GLRenderTarget::{attachTexture,detachTexture}
They're unused and immutable render targets are easier to handle.
parent
eea94660
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libkwineffects/kwinglutils.cpp
View file @
383a5cee
...
...
@@ -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
[]
=
{
...
...
src/libkwineffects/kwinglutils.h
View file @
383a5cee
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment