Kaydet (Commit) 5de8f155 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Caolán McNamara

tdf#88831 fix inverted textures when OpenGL is enabled

GLX returns a wrong value if the y coords are inverted. Most other
programs don't even ask for this (gnome-shell for example) and just
assumes "true" (and this works because most relevant X servers work
like this). We make this more robust and assume true only if the
returned value is GLX_DONT_CARE (-1).

Change-Id: I4800b3364fd00f5f4a8f5a459472bfa8d97827ba
Reviewed-on: https://gerrit.libreoffice.org/16860Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e1ab7835
......@@ -539,7 +539,11 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted
}
glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_Y_INVERTED_EXT, &nValue );
bInverted = nValue == True;
// Looks like that X sends GLX_DONT_CARE but this usually means "true" for most
// of the X implementations. Investigation on internet pointed that this could be
// safely "true" all the time (for example gnome-shell always assumes "true").
bInverted = nValue == True || nValue == int(GLX_DONT_CARE);
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment