diff options
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgrhisupport.cpp | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/outlinedtext_core.vert | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/styledtext_core.vert | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/textmask_core.vert | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index afcfa53e83..9194d3e730 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -465,6 +465,10 @@ QOffscreenSurface *QSGRhiSupport::maybeCreateOffscreenSurface(QWindow *window) // must be called on the render thread QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurface) { +#if !QT_CONFIG(opengl) && !QT_CONFIG(vulkan) + Q_UNUSED(window); +#endif + QRhi *rhi = nullptr; QRhi::Flags flags; @@ -487,6 +491,8 @@ QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurf rhiParams.window = window; rhi = QRhi::create(backend, &rhiParams, flags); } +#else + Q_UNUSED(offscreenSurface); #endif #if QT_CONFIG(vulkan) if (backend == QRhi::Vulkan) { diff --git a/src/quick/scenegraph/shaders/outlinedtext_core.vert b/src/quick/scenegraph/shaders/outlinedtext_core.vert index ae945b013a..a854355460 100644 --- a/src/quick/scenegraph/shaders/outlinedtext_core.vert +++ b/src/quick/scenegraph/shaders/outlinedtext_core.vert @@ -21,6 +21,6 @@ void main() sCoordDown = (tCoord - vec2(0.0, 1.0)) * textureScale; sCoordLeft = (tCoord - vec2(-1.0, 0.0)) * textureScale; sCoordRight = (tCoord - vec2(1.0, 0.0)) * textureScale; - vec3 dprSnapPos = round(vCoord.xyz * dpr + 0.5) / dpr; + vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr; gl_Position = matrix * vec4(dprSnapPos, vCoord.w); }
\ No newline at end of file diff --git a/src/quick/scenegraph/shaders/styledtext_core.vert b/src/quick/scenegraph/shaders/styledtext_core.vert index 7e313eb797..04a0e88da8 100644 --- a/src/quick/scenegraph/shaders/styledtext_core.vert +++ b/src/quick/scenegraph/shaders/styledtext_core.vert @@ -15,6 +15,6 @@ void main() { sampleCoord = tCoord * textureScale; shiftedSampleCoord = (tCoord - shift) * textureScale; - vec3 dprSnapPos = round(vCoord.xyz * dpr + 0.5) / dpr; + vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr; gl_Position = matrix * vec4(dprSnapPos, vCoord.w); } diff --git a/src/quick/scenegraph/shaders/textmask_core.vert b/src/quick/scenegraph/shaders/textmask_core.vert index 5c510a2d23..b0efc1e731 100644 --- a/src/quick/scenegraph/shaders/textmask_core.vert +++ b/src/quick/scenegraph/shaders/textmask_core.vert @@ -12,6 +12,6 @@ uniform float dpr; void main() { sampleCoord = tCoord * textureScale; - vec3 dprSnapPos = round(vCoord.xyz * dpr + 0.5) / dpr; + vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr; gl_Position = matrix * vec4(dprSnapPos, vCoord.w); } |