File: 90qt5-opengl

package info (click to toggle)
qtbase-opensource-src 5.7.1%2Bdfsg-3%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 283,652 kB
  • sloc: cpp: 1,754,662; ansic: 433,142; xml: 100,291; python: 9,650; sh: 7,671; java: 6,543; asm: 4,283; perl: 2,217; yacc: 1,733; lex: 1,194; makefile: 333; objc: 70
file content (21 lines) | stat: -rw-r--r-- 966 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- sh -*-
# Xsession.d script to set the QT_XCB_FORCE_SOFTWARE_OPENGL env variable when
# the user does not has at least OpenGL 2 support.
#
# This file is sourced by Xsession(5), not executed.

if [ "$(which glxinfo)" = "" ] ; then
    echo "To detect whether software based rendering is needed for Qt 5 the glxinfo program is a requirement but it was not found on this system."
    echo "On Debian (based) systems, install the mesa-utils package."
    #echo "On RedHat (based) systems, install the glx-utils package."
else
    OPENGL_VERSION=`LANG=C glxinfo | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'`
    if [ -n "$OPENGL_VERSION" ] && [ "$OPENGL_VERSION" -lt 2 ]; then
        QT_XCB_FORCE_SOFTWARE_OPENGL=1
        export QT_XCB_FORCE_SOFTWARE_OPENGL
    elif [ -n "$OPENGL_VERSION" ] ; then
        echo "OpenGL version: $OPENGL_VERSION."
    else
        echo "OpenGL version not found."
    fi
fi