Readd the hack for Xgl in findTarget.
Apparently glXQueryDrawable does not work in NVIDIA blob for binding a texture from an icon. This fixes an abort, but the root cause should be found and fixed properly.
This commit is contained in:
parent
9865608fb3
commit
0b6e47ea35
1 changed files with 11 additions and 0 deletions
|
@ -653,6 +653,17 @@ void SceneOpenGL::Texture::findTarget()
|
|||
unsigned int new_target = 0;
|
||||
if (glXQueryDrawable && glxpixmap != None)
|
||||
glXQueryDrawable(display(), glxpixmap, GLX_TEXTURE_TARGET_EXT, &new_target);
|
||||
// HACK: this used to be a hack for Xgl.
|
||||
// without this hack the NVIDIA blob aborts when trying to bind a texture from
|
||||
// a pixmap icon
|
||||
if (new_target == 0) {
|
||||
if (NPOTTextureSupported() ||
|
||||
(isPowerOfTwo(mSize.width()) && isPowerOfTwo(mSize.height()))) {
|
||||
new_target = GLX_TEXTURE_2D_EXT;
|
||||
} else {
|
||||
new_target = GLX_TEXTURE_RECTANGLE_EXT;
|
||||
}
|
||||
}
|
||||
switch(new_target) {
|
||||
case GLX_TEXTURE_2D_EXT:
|
||||
mTarget = GL_TEXTURE_2D;
|
||||
|
|
Loading…
Reference in a new issue