also work around broken fbo texture clearing on fglrx
so far supports FBO/glClear and resorts to glTexSubImage2D
if the fbo cannot be created or is (in case of fglrx)
known to break, resort to glTexImage2D loading of an
argb array of zeros
BUG: 323065
FIXED-IN: 4.11.2
REVIEW: 112526
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
This method returns a matrix that transforms normalized or un-normalized
texture coordinates, taking the texture target and y-inversion flag into
account.
Ownership of decoration textures is moved from SceneOpenGL::Window to
OpenGLPaintRedirector. The PaintRedirector is responsible for updating
the textures whenever they change. For this GLTexture is extended by an
update(QImage, QPoint) method which uses glTexSubImage2D to update only
the changed parts.
The big advantage compared to before is that if e.g. only a button is
animated only the button part is updated instead of the complete deco
part.
If the build option is enabled KWIN_HAVE_OPENGL_1 is passed as a compile
flag when build against OpenGL.
This compile flag is meant to replace the KWIN_HAVE_OPENGLES. So far code
has been ifdefed for special behavior of OpenGL ES 2.0 and to remove
fixed functionality calls which are not available in OpenGL ES 2.0.
With this build flag the fixed functionality calls which are only used in
the OpenGL1 Compositor can be removed and keeping the KWIN_HAVE_OPENGLES
for the real differences between OpenGL 2.x and OpenGL ES 2.0.
E.g. a call like glColor4f should be in an
glColor4f(1.0, 1.0, 1.0, 1.0);
while a call like glPolygonMode should be in an
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
Building for OpenGL ES 2.0 of course implies that KWIN_HAVE_OPENGL_1 is
not defined.
This patch changes the behavior of strictly bound textures such that
they are only updated if the corresponding window has been damaged.
Additionally GLTexture now keeps track of the current filter and
wrapmode setting.
REVIEW: 103655
Fixes rendering issues with R300 and similar GPUs. If the texture
uses GL_TEXTURE_RECTANGLE_ARB as target the tex coordinates need
to be adjusted. This at least fixes missing text on EffectFrames
with graphicssystem native on R300. Hopefully more issues are
resolved by the change.
BUG: 269576
CCBUG: 282882
FIXED-IN: 4.7.3
Additionally:
- hide the GLTexture implementation using dpointers
- drop the unused function SceneOpenGL::Texture::optimizeBindDamage()
- Texture::load now loads a new texture and does not update the existing one
REVIEW: 101999
Now convertToGLFormat does no longer mirror the texture, so that we can
avoid a deep copy in case we render a GL_BGRA texture on a little endian system.
REVIEW: 101739