summaryrefslogtreecommitdiffstats
path: root/src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2019-04-01 15:08:11 +0300
committerJere Tuliniemi <jere.tuliniemi@qt.io>2019-04-16 09:16:37 +0000
commitc6edb9c7d15843e8ab965d365099ace29e2d2049 (patch)
tree0a24f87676d342c69254e9baeedadaaf4a70e5e5 /src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp
parent156910d1df8d3f11b72664cf0bf6b7fe800b53cf (diff)
Add distance field rendering to OpenGL runtime
The old text rendering remains in the background and is used to render clipped text, since that feature is not yet implemented for distance field fonts. Building the runtime with Qt version older than 5.12.2 also causes a fallback to the old text rendering. Depth pass rendering also needs to be redone in the future to avoid another full render pass. Task-number: QT3DS-3210 Change-Id: Ib7666c437d23ae25e1872682f010df3721476a14 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp')
-rw-r--r--src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp b/src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp
index 8fa75792..27f326eb 100644
--- a/src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp
+++ b/src/Runtime/Source/engine/Qt3DSRenderRuntimeBinding.cpp
@@ -894,9 +894,14 @@ struct Qt3DSRenderSceneManager : public Q3DStudio::ISceneManager,
inPresentation.SetScene(&inScene);
if (m_ProjectInitialized == false) {
m_ProjectInitialized = true;
- if (m_Context->m_Context->GetTextRenderer())
+ if (m_Context->m_Context->GetTextRenderer()) {
m_Context->m_Context->GetTextRenderer()->AddProjectFontDirectory(
inScene.m_Presentation->m_PresentationDirectory);
+ }
+ if (m_Context->m_Context->getDistanceFieldRenderer()) {
+ m_Context->m_Context->getDistanceFieldRenderer()->AddProjectFontDirectory(
+ inScene.m_Presentation->m_PresentationDirectory);
+ }
eastl::string theBinaryPath(inPresentation.GetFilePath().toLatin1().constData());
qt3ds::foundation::CFileTools::AppendDirectoryInPathToFile(theBinaryPath, "binary");
eastl::string theBinaryDir(theBinaryPath);