summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/glxconvenience
Commit message (Collapse)AuthorAgeFilesLines
* glxconvenience: Add a QT_XCB_FORCE_SOFTWARE_OPENGL environment variable.Kevin Kofler2014-02-071-0/+29
| | | | | | | | | | | | | | | | | | | | | The QT_XCB_FORCE_SOFTWARE_OPENGL environment variable is equivalent to LIBGL_ALWAYS_SOFTWARE for Qt 5 applications only. This is most useful with drivers that only support OpenGL 1. We need OpenGL 2, but the user probably doesn't want LIBGL_ALWAYS_SOFTWARE in OpenGL 1 apps. Together with http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/tree/10-qt5-check-opengl2.sh which goes into /etc/X11/xinit/xinitrc.d, it makes QML 2 just work on old hardware that supports only OpenGL 1.x in hardware. The scriptlet checks the glxinfo output for the OpenGL version and sets QT_XCB_FORCE_SOFTWARE_OPENGL if the major version is < 2. (The scriptlet requires xorg-x11-xinit and glx-utils.) Tested on a Radeon 9200 SE (RV280) that supports only OpenGL 1.3 in hardware. Change-Id: Ief80d283820d6336052b8f390a0030ba9b687492 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* build glxconvenience also without XrenderOswald Buddenhagen2013-09-051-2/+3
| | | | | | | it contains #ifdefs for that, no need to disable it completely. Change-Id: I4a7d03e09fefded966e2c3fec58a470b4f1d3300 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* mark private dependencies as suchOswald Buddenhagen2013-05-201-1/+1
| | | | | | Change-Id: Ic93c8dc5aaad3973e4d4fc6bb3b70ad7c0a632b0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Pass the surface format to qglx_surfaceFormatFromGLXFBConfigGiuseppe D'Angelo2013-02-232-16/+11
| | | | | | | | | Instead of creating a default-constructed format and filling its field in, pass a pointer to an instance. This way we won't lose the renderable type set on the surface, but just fill in the other parameters. Change-Id: I1fd403671f9c677cc74aaf3c116a05f213d5d556 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Enforce OpenGL context creation under XCBGiuseppe D'Angelo2013-02-231-0/+2
| | | | | | | | | We don't support other context types, so fail in those cases. Also, return OpenGL as the rendereable type of our surface. Change-Id: Ic7b5ed0ec5eaf5c0f88f50f5bceb697ea414c696 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-182-2/+2
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed qglxconvenience.cpp compile for GLX 1.3.Samuel Rødal2012-10-011-1/+3
| | | | | | | | These defines are new in GLX 1.4, earlier they were ARB extensions. Task-number: QTBUG-27370 Change-Id: I83828067d106e93a3909de46a4051d492e277ba9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* XCB: Correctly report the created OpenGL context version and profileSean Harmer2012-09-261-0/+2
| | | | | | | | | | | | | | | This commit fixes the xcb qpa plugin such that it now correctly reports the version and profile of the created OpenGL context in the QOpenGLSurfaceFormat. To do this we have to create a temporary X window so that we can make our new context current. We also handle the buggy nVidia drivers which incorrectly report 0 for the GL_CONTEXT_PROFILE_MASK query. The reduced format is also copied back from qglx_findVisualInfo. Change-Id: I6f34fe1c6130aebbb6b40c36df4acc216069d2b1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-222-49/+49
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Revert "Remove the LIBS from platformsupport"Samuel Rødal2012-03-201-0/+1
| | | | | | | | | | | | This reverts commit cd6e90c70ac13065257422088ffa01537ed9c685. Prevent symbol lookup error when requesting alpha visuals with GLX in the xcb plugin. This means other plugins will also link against -lXrender, but we need this workaround for now. Change-Id: I2fd2c63bc577c2497060a555c91d72337723b931 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove the LIBS from platformsupportJørgen Lind2012-03-021-1/+0
| | | | | | | | | The application / library that uses this should know it needs to link to ie. udev, xrendr etc. Change-Id: I9e3ffd4d98b3bd66abb8e621378b010da7feda7a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Properly read back the actual format in xcb and xlib plugins.Samuel Rødal2012-02-102-7/+12
| | | | | Change-Id: Iccef2c4a87863b93914b84edf3a6015dad5e512a Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* More graceful handling of QSurfaceFormat::samples() with GLX.Samuel Rødal2012-02-101-1/+1
| | | | | | | | | | Earlier, if we asked for say 16 and the implementation only handled 4, we defaulted to 0 (no antialiasing). Now, we instead try a progressively lower number until we find a match. Task-number: QTBUG-22669 Change-Id: I3d89f2a302f9c6195e2d43827006fd015d981ce7 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-302-2/+2
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fall back on glXChooseVisual() if glXChooseFBConfig() doesn't work.Samuel Rødal2012-01-271-9/+66
| | | | | | | | | | Some older drivers don't fully support glXChooseFBConfig(). As a bonus, fix some memory leaks here and there. Task-number: QTBUG-21880 Change-Id: Ie306dee27f616927a6aa55fd71601569b828afcc Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-232-2/+2
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added xrender as a dependency to build glxconvenience.Samuel Rødal2012-01-061-1/+1
| | | | | | | Prevents build errors when xrender is not present. Change-Id: Ib80d52109dd0bcd63ba865c5f6e143961f3c20e6 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-052-2/+2
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Link to X and Xrender libs in glxconvenienceJørgen Lind2011-12-231-0/+1
| | | | | Change-Id: I54b2704be678f2c3b9ab8d24d044977c9c01e98e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* OpenGL API refactor.Samuel Rødal2011-06-212-16/+16
| | | | | | Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of having QPlatformGLSurface accessor in QWindow.
* QtPlatformSupport: A helper library for platform pluginsJørgen Lind2011-06-103-0/+288
QtPlatformSupport is a static library. Platform plugins are meant to link against this library to pull in dependencies such as fontengines and convenience functions for finding the right GL configs. The linker will only pull in the symbols used, so the size of the library doesn't really matter