kwin: If GLTexture::load is called, glxpixmap doesn't need to exist
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
This commit is contained in:
parent
93dc4d459c
commit
a3962f895d
1 changed files with 6 additions and 4 deletions
|
@ -676,8 +676,9 @@ void SceneOpenGL::Texture::bind()
|
|||
{
|
||||
glEnable(mTarget);
|
||||
glBindTexture(mTarget, mTexture);
|
||||
if (options->glStrictBinding) {
|
||||
assert(glxpixmap != None);
|
||||
// if one of the GLTexture::load functions is called, the glxpixmap doesnt
|
||||
// have to exist
|
||||
if (options->glStrictBinding && glxpixmap) {
|
||||
glXReleaseTexImageEXT(display(), glxpixmap, GLX_FRONT_LEFT_EXT);
|
||||
glXBindTexImageEXT(display(), glxpixmap, GLX_FRONT_LEFT_EXT, NULL);
|
||||
setDirty(); // Mipmaps have to be regenerated after updating the texture
|
||||
|
@ -694,8 +695,9 @@ void SceneOpenGL::Texture::unbind()
|
|||
if (hasGLVersion(1, 4, 0)) {
|
||||
glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f);
|
||||
}
|
||||
if (options->glStrictBinding) {
|
||||
assert(glxpixmap != None);
|
||||
// if one of the GLTexture::load functions is called, the glxpixmap doesnt
|
||||
// have to exist
|
||||
if (options->glStrictBinding && glxpixmap) {
|
||||
glBindTexture(mTarget, mTexture);
|
||||
glXReleaseTexImageEXT(display(), glxpixmap, GLX_FRONT_LEFT_EXT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue