- Feb 19, 2014
-
-
Tor Arne Vestbø authored
Instead of the glyph cache having its own cache type that always mapped one to one to a font engine glyph format, causing confusion and needless conversions, the glyph caches now use QFontEngine's glyph format enum. This also removes the iffy use of an int for the glyphFormat in the font engines. Change-Id: I529bad5c179e004f63e152f7dcc311d298c3db98 Reviewed-by:
Simon Hausmann <simon.hausmann@digia.com>
-
- Feb 14, 2014
-
-
Laszlo Agocs authored
The patch introduces a new build configuration on Windows which can be requested by passing -opengl dynamic to configure. Platforms other than Windows (including WinRT) are not affected. The existing Angle and desktop configurations are not affected. These continue to function as before and Angle remains the default. In the future, when all modules have added support for the dynamic path, as described below, the default configuration could be changed to be the dynamic one. This would allow providing a single set of binaries in the official builds instead of the current two. When requesting dynamic GL, Angle is built but QT_OPENGL_ES[_2] are never defined. Instead, the code path that has traditionally been desktop GL only becomes the dynamic path that has to do runtime checks. Qt modules and applications are not linked to opengl32.dll or libegl/glesv2.dll in this case. Instead, QtGui exports all necessary egl/egl/gl functions which will, under the hood, forward all requests to a dynamically loaded EGL/WGL/GL implementation. Porting guide (better said, changes needed to prepare your code to work with dynamic GL builds when the fallback to Angle is utilized): 1. In !QT_OPENGL_ES[_2] code branches use QOpenGLFunctions::isES() to differentiate between desktop and ES where needed. Keep in mind that it is the desktop GL header (plus qopenglext.h) that is included, not the GLES one. QtGui's proxy will handle some differences, for example calling glClearDepth will route to glClearDepthf when needed. The built-in eglGetProcAddress is able to retrieve pointers for standard GLES2 functions too so code resolving OpenGL 2 functions will function in any case. 2. QT_CONFIG will contain "opengl" and "dynamicgl" in dynamic builds, but never "angle" or "opengles2". 3. The preprocessor define QT_OPENGL_DYNAMIC is also available in dynamic builds. The usage of this is strongly discouraged and should not be needed anywhere except for QtGui and the platform plugin. 4. Code in need of the library handle can use QOpenGLFunctions::platformGLHandle(). The decision on which library to load is currently based on a simple test that creates a dummy window/context and tries to resolve an OpenGL 2 function. If this fails, it goes for Angle. This seems to work well on Win7 PCs for example that do not have proper graphics drivers providing OpenGL installed but are D3D9 capable using the default drivers. Setting QT_OPENGL to desktop or angle skips the test and forces usage of the given GL. There are also two new application attributes that could be used for the same purpose. If Angle is requested but the libraries are not present, desktop is tried. If desktop is requested, or if angle is requested but nothing works, the EGL/WGL functions will still be callable but will return 0. This conveniently means that eglInitialize() and such will report a failure. Debug messages can be enabled by setting QT_OPENGLPROXY_DEBUG. This will tell which implementation is chosen. The textures example application is ported to OpenGL 2, the GL 1 code path is removed. [ChangeLog][QtGui] Qt builds on Windows can now be configured for dynamic loading of the OpenGL implementation. This can be requested by passing -opengl dynamic to configure. In this mode no modules will link to opengl32.dll or Angle's libegl/libglesv2. Instead, QtGui will dynamically choose between desktop and Angle during the first GL/EGL/WGL call. This allows deploying applications with a single set of Qt libraries with the ability of transparently falling back to Angle in case the opengl32.dll is not suitable, due to missing graphics drivers for example. Task-number: QTBUG-36483 Change-Id: I716fdebbf60b355b7d9ef57d1e069eef366b4ab9 Reviewed-by:
Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by:
Jørgen Lind <jorgen.lind@digia.com>
-
- Nov 06, 2013
-
-
Gunnar Sletta authored
The freetype font engine would fall back to rasterizing glyphs via QPainterPath in QFontEngine::alphaMapForGlyph() which has a rather unfortunate implementation. Change-Id: Ic0b4095b6f17ab33f0602139f0a8fb441dfba0ee Reviewed-by:
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-
- Nov 04, 2013
-
-
Allan Sandfeld Jensen authored
Change Ie891665ad66e31692b69db02d34be8d303a7d631 accidentially removed the condition that would ensure ARGB glyphs would get swizzled on OpenGL ES2. This patch readds a condition to check that, and also fixes the same on big endian hosts by reusing the OpenGL ES2 code path. Change-Id: I55615c498261a43c50e5a6902a7e2e24cddc4f4b Reviewed-by:
Gunnar Sletta <gunnar.sletta@digia.com>
-
- Aug 12, 2013
-
-
Oswald Buddenhagen authored
it's no good idea to #if 0 the opening brace but comment out the closing one. Change-Id: I6f9ca8f14f0dc82fb22df85de547564336ed0476 Reviewed-by:
Sean Harmer <sean.harmer@kdab.com> Reviewed-by:
Gunnar Sletta <gunnar.sletta@digia.com>
-
- Jul 30, 2013
-
-
Gunnar Sletta authored
OpenGL ES doesn't allow internal format to be different from external format, so always do the conversion from BGRA -> RGBA. We are anyway iterating over all the pixels so the performance impact of this should be minimal. Change-Id: Ie891665ad66e31692b69db02d34be8d303a7d631 Reviewed-by:
Andy Shaw <andy.shaw@digia.com> Reviewed-by:
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-
- Jun 05, 2013
-
-
Valery Volgutov authored
QOpenGLTextureGlyphCache::restoreTextureData restores FBO which was binded before restoreTextureData call. More specifically, it restores QOpenGLContextPrivate's current_fbo member. This works if FBO was binded by QOpenGLFramebufferObject but not if FBO was binded using glBindFramebufferObject and rendering done via QOpenGLPaintDevice. This patch fixes it by querying current FBO using GL_FRAMEBUFFER_BINDING query and restoring it. Change-Id: Ia97a21e62566dc39a5191b66d3ca0e3ad0845ce1 Reviewed-by:
Valery Volgutov <valery.volgutov@lge.com> Reviewed-by:
Gunnar Sletta <gunnar.sletta@digia.com>
-
- Feb 13, 2013
-
-
Tor Arne Vestbø authored
A new glyph type is added to the glyph caches for ARGB bitmap glyphs, and the raster and OpenGL paint engines have been modified to support this glyph type for drawCachedGlyphs(). The CoreText font engine implements support for these glyphs through the CTFontDrawGlyphs API, since CGContextShowGlyphsWithAdvances does not handle color glyphs. Change-Id: Idad9ce75a911cae130d65aebe59142772a16fc12 Reviewed-by:
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-
- Jan 18, 2013
-
-
Sergio Ahumada authored
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by:
Lars Knoll <lars.knoll@digia.com>
-
- Nov 06, 2012
-
-
Eskil Abrahamsen Blomfeldt authored
Angle, for instance, which is now the default on Windows, does not support the GL_BGRA_EXT format as input for glTexSubImage2D(). In the case where it's not detected, we therefore need to flip the bytes in the input. Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7 Reviewed-by:
Samuel Rødal <samuel.rodal@digia.com>
-
- Sep 22, 2012
-
-
Iikka Eklund authored
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>
-
- Aug 20, 2012
-
-
Sean Harmer authored
The Khronos group makes the glext.h (Desktop OpenGL) and gl2ext.h (OpenGL ES2) headers officially available nowadays. Most (all?) Linux systems ship this by default. On Windows platforms the glext.h file needs to be downloaded from http://www.opengl.org/registry/api/glext.h and placed alongside the system OpenGL header. Making use of the official header reduces the maintenance overhead for OpenGL support in Qt by removing the need to copy and paste definitions into the Qt sources. As the Khronos-provided headers are standardised and backwards and forwards compatible we can utilise these for all platforms rather than just for Windows. This means that all definitions required by Qt will be present even if the system ships out-dated equivalents. Mac OS X needs special handling in that we should always use the system-provided headers there. This is because Apple controls the OpenGL driver and the headers that go along with it. As such there is no possibility that the driver exposes additional functionality compared with the system-provided OpenGL headers. Apple has also decided to make different decisions about some OpenGL typedefs compared to other implementations. For example, Apple typdefs GLhandleARB to void* whereas other platforms use unsigned int. The alternative, which is to use the system provided glext.h (or gl2ext.h) header means that Qt code would need to check for the availability of such definitions wherever it is not guaranteed to be provided by core OpenGL/ES just to compile. The proposed approach means that Qt can compile regardless of the system's OpenGL extension support. We just need to be rigourous in runtime checking of support for extensions but that is already a requirement (and is missing in a few places, see TODO's added in this commit). The official Khronos headers are added to Qt as qopenglext.h - Desktop OpenGL qopengles2ext.h - OpenGL ES2 They need to be public but not part of QtGui module include, hence the headers have been modified by adding #if 0 #pragma qt_no_master_include #endif to them. This has been tested on: Gentoo Linux with GCC 4.6.3 Windows 7 with MSVC 2010 Mac OSX 10.8 with Apple clang 4.0 (based on LLVM 3.1svn) QNX with qcc (based on GCC 4.4) A small change is needed to QtDeclarative when building for OpenGL ES 2 after applying this commit. See https://codereview.qt-project.org/#change,31794 Change-Id: I4b3d2b1680baf4c78be9a87b4d8de076d23e8f82 Reviewed-by:
Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by:
Lars Knoll <lars.knoll@nokia.com>
-
- Jul 05, 2012
-
-
Eskil Abrahamsen Blomfeldt authored
When used in the SceneGraph we're expected to disable the arrays after we're done, otherwise we'll get a warning about memory corruption and crashes. Change-Id: Ie8e426309716bef4b75d79039e8ca0b4943c79e7 Reviewed-by:
Jiang Jiang <jiang.jiang@nokia.com>
-
Jiang Jiang authored
When m_blitProgram is created the constructor will add it to QOpenGLContext as a child of that QObject, so it will be deleted when that QOpenGLContext is deleted as QObject will delete its children in destructor. Delete it here will cause crash in thread termination. Change-Id: If9d3287d159cc3276b6a840a584a1b212b9c9fd0 Reviewed-by:
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
-
- May 01, 2012
-
-
Lars Knoll authored
set m_textureResource to 0 after freeing it, to ensure we allocate a new one two lines below before using it again 5 lines below. Change-Id: Ib9c4de94aefed91f15d0fab0cd3c774a64f2f891 Reviewed-by:
Thiago Macieira <thiago.macieira@intel.com> Reviewed-by:
Samuel Rødal <samuel.rodal@nokia.com>
-
- Jan 30, 2012
-
-
Jason McDonald authored
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>
-
- Jan 23, 2012
-
-
Jason McDonald authored
Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by:
Rohan McGovern <rohan.mcgovern@nokia.com>
-
- Jan 05, 2012
-
-
Jason McDonald authored
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by:
Rohan McGovern <rohan.mcgovern@nokia.com>
-
- Oct 28, 2011
-
-
Samuel Rødal authored
ES 1.0 didn't have glTexParameteri, which is why we sometimes used glTexParameterf. However, we shouldn't use glTexParameterf because that's treating integer values as floating point, which is not type safe. ES 1.1+ and ES 2.x have glTexParameteri, and we don't really care about supporting ES 1.0 in any case in Qt 5. Change-Id: I6b586b31ddc418ba319c4cc88f6bb3978fdbd040 Reviewed-by:
Kim M. Kalland <kim.kalland@nokia.com>
-
- Oct 13, 2011
-
-
Friedemann Kleint authored
Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by:
Samuel Rødal <samuel.rodal@nokia.com>
-
- Oct 07, 2011
-
-
Samuel Rødal authored
Change-Id: I384f82f1549a81e19566484e12c75ce8df1f314f Reviewed-on: http://codereview.qt-project.org/6149 Reviewed-by:
Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by:
Lars Knoll <lars.knoll@nokia.com> Reviewed-by:
Gunnar Sletta <gunnar.sletta@nokia.com>
-
- Aug 30, 2011
-
-
Samuel Rødal authored
We don't want to have source files in the opengl module and gui with the same name, at least not private headers. Change-Id: I5f2bf629c943a67a405574fb148aa4c70e58ecbb Reviewed-on: http://codereview.qt.nokia.com/3864 Reviewed-by:
Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by:
Gunnar Sletta <gunnar.sletta@nokia.com>
-
- Aug 29, 2011
-
-
Samuel Rødal authored
Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by:
Gunnar Sletta <gunnar.sletta@nokia.com>
-
Samuel Rødal authored
Made resource handling more robust by attempting to free GL resources in the correct thread, and not forcing a context to become current to free resources. Change-Id: Ie81d4005b608972375755571d9b50ce82080709b Reviewed-on: http://codereview.qt.nokia.com/3258 Reviewed-by:
Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by:
Gunnar Sletta <gunnar.sletta@nokia.com>
-
- Aug 16, 2011
-
-
Samuel Rødal authored
Change-Id: I646b8e26d5e7214432a044866764d57cc11b2390 Reviewed-on: http://codereview.qt.nokia.com/3006 Reviewed-by:
Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by:
Jørgen Lind <jorgen.lind@nokia.com>
-
- May 24, 2011
-
-
Jyri Tahtela authored
Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
-
- Apr 27, 2011
-
-
Qt by Nokia authored
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12
-