aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgopengllayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove layer and dist.field glyph cache OpenGL versionsLaszlo Agocs2020-06-021-481/+0
| | | | | | Task-number: QTBUG-79268 Change-Id: I16123a8a49d17e3ffdd5cbcfbebcd8bfa46e648c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Adjust QSGTexture comparisonKey typeLaszlo Agocs2020-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | The original choice was int, simply following textureId(). This was later deemed insufficient: instead of a GLuint, the value is now often a 64-bit value (on 64 bit systems), based on a pointer, since the identity of a texture in the RHI world is the QRhiTexture* itself. In a custom texture implementation it is likely that the value here is the value of a native object handle, either a pointer or some 32 or 64 bit integer. Inspired by the recent QSGTexture::NativeTexture struct change (void* -> quint64), switch to a qint64 which is big enough to hold all these without truncation. We choose a signed value here, in order to allow for the following pattern that is widespread in material compare() implementations: if (qint64 diff = m_texture->comparisonKey() - other->texture()->comparisonKey()) return diff; Fixes: QTBUG-83769 Change-Id: I8bdae8cd835282358ded53b3703142b8f26e4400 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Make comparisonKey() a pure virtual in QSGTextureLaszlo Agocs2020-04-161-4/+3
| | | | | | | | | | In Qt 5.14 this was a virtual in QSGTexturePrivate due to having had to maintain binary compatibility. In 6.0 it becomes a pure virtual in QSGTexture. Task-number: QTBUG-82997 Change-Id: I26a42169b071fe8d413f5c89ef45850fa7222006 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Quick: Don't qualify OpenGL includesUlf Hermann2020-01-271-3/+3
| | | | | | | | | | | | | The headers are moving from QtGui to QtOpenGL. By avoiding the qualification we can keep them compiling either way. Also, add opengl-private to make the types available. Also removed the QGraphicsRotation hack to get access to the projected rotation function of QMatrix4x4. The function is public now. Task-number: QTBUG-74409 Change-Id: I216e8ca09f8e247f96627b081308e3a57c55c29c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Avoid changing function signature in public headerLaszlo Agocs2019-09-181-1/+1
| | | | | Change-Id: I0be124dfcafa2244531281ffd1ac6b559d82c604 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add the graphics api independent scenegraph portLaszlo Agocs2019-07-041-0/+482
Opt in via environment variables: QSG_RHI=1 -> enable using QRhi instead of GL QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default (the default is d3d11 on Windows, metal on Mac, gl elsewhere) Or force a given rhi backend via the existing QQuickWindow::setSceneGraphBackend(). Otherwise the default behavior is the same as before, the rhi code path is never active by default. -no-opengl builds are supported in the sense that they work and default to the software backend. However, the rhi code path cannot currently be used in such builds, even though QRhi from qtbase is fully functional with Vulkan, D3D, or Metal even when qtbase was configured with -no-opengl. This cannot be utilized by Quick atm due to OpenGL usage being all over the place in the sources corresponding to the default backend, and those host the rhi code path as well. This will be cleaned up hopefully in Qt 6, with the removal all direct OpenGL usage. Other env.vars.: QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer (assuming the system is set up for this) QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too) QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both merged/unmerged, convert when needed - with some rhi backends this is implicit) QSG_RENDER_LOOP -> to override the render loop as usual. The default with RHI is threaded for Metal, threaded for Vulkan on Windows, basic for Vulkan on Linux and Android (to be checked later), while the existing rules apply for OpenGL. Not supported when running with QRhi: - particles - compressed atlases (though this is transparent to the apps) - QSGRenderNode - QQuickRenderControl - QQuickFramebufferObject - certain QQuickWindow functionality that depends directly on OpenGL - anisotropic filtering for textures - native text may lack some gamma correction - QSGEngine applicability unclear - some QML profiler logs may be incorrect or irrelevant Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521 Reviewed-by: Lars Knoll <lars.knoll@qt.io>