The workaround with explicitly asking for texture target with tfp

doesn't seem to be necessary.


svn path=/branches/work/kwin_composite/; revision=628209
This commit is contained in:
Luboš Luňák 2007-01-29 14:32:20 +00:00
parent e0ed5d5f3f
commit 2324e92b4e
2 changed files with 0 additions and 10 deletions

View file

@ -120,8 +120,6 @@ OpenGL TODO
/ GL_ARB_texture_rectangle vs GL_ARB_texture_non_power_of_two
% - works; bugs in tfp_mode with power_of_two textures
- nvidia: tfp_target needed in bindTexture() else glXCreatePixmap fails;
shouldn't be necessary according to texture_from_pixmap spec
- ati (others?): power_of_two windows are drawn white unless non-tfp_mode
is forced in findTextureTarget()

View file

@ -853,17 +853,9 @@ void SceneOpenGL::Window::bindTexture()
glXReleaseTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT );
glXDestroyGLXPixmap( display(), bound_glxpixmap );
}
// TODO works around a crash; check later whether we really need this
unsigned int tfp_target;
if( supports_npot_textures ||
( isPowerOfTwo( toplevel->width() ) && isPowerOfTwo( toplevel->height() )))
tfp_target = GLX_TEXTURE_2D_EXT;
else
tfp_target = GLX_TEXTURE_RECTANGLE_EXT;
static const int attrs[] =
{
GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGBA_EXT,
GLX_TEXTURE_TARGET_EXT, tfp_target,
None
};
// the GLXPixmap will reference the X pixmap, so it will be freed automatically