editor: build speed improvement for embedded resources
This commit is contained in:
@@ -43,6 +43,7 @@ set (SOURCE_FILES
|
||||
GeneralWindow.cpp
|
||||
ProfilerWindow.cpp
|
||||
xatlas.cpp
|
||||
EmbeddedResources.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(meshoptimizer)
|
||||
|
||||
+2
-5
@@ -5,9 +5,6 @@
|
||||
#include "ModelImporter.h"
|
||||
#include "Translator.h"
|
||||
|
||||
#include "FontAwesomeV6.h" // font TTF data
|
||||
#include "yumin.h" // yumin.ttf font
|
||||
|
||||
using namespace wi::graphics;
|
||||
using namespace wi::primitive;
|
||||
using namespace wi::scene;
|
||||
@@ -608,10 +605,10 @@ void EditorComponent::Start()
|
||||
// We will not directly use this font style, but let the font renderer fall back on it
|
||||
// when an icon character is not found in the default font.
|
||||
// This is added on main thread, not inside Load(), to avoid conflict with font system intialization
|
||||
wi::font::AddFontStyle("FontAwesomeV6", font_awesome_v6, sizeof(font_awesome_v6));
|
||||
wi::font::AddFontStyle("FontAwesomeV6", font_awesome_v6, font_awesome_v6_size);
|
||||
|
||||
// Same thing with the yumin font as above, it is a fallback for asian characters
|
||||
wi::font::AddFontStyle("yumin", yumin, sizeof(yumin));
|
||||
wi::font::AddFontStyle("yumin", yumin, yumin_size);
|
||||
|
||||
RenderPath2D::Start();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)ComponentsWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)DecalWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)Editor.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)EmbeddedResources.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)EmitterWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)EnvProbeWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)ExpressionWindow.cpp" />
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)HumanoidWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)GeneralWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)ProfilerWindow.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)EmbeddedResources.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)AnimationWindow.h" />
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "FontAwesomeV6.h" // font TTF data
|
||||
const size_t font_awesome_v6_size = sizeof(font_awesome_v6);
|
||||
|
||||
#include "yumin.h" // yumin.ttf font
|
||||
const size_t yumin_size = sizeof(yumin);
|
||||
@@ -14,3 +14,9 @@
|
||||
|
||||
#include "WickedEngine.h"
|
||||
#include "Editor.h"
|
||||
|
||||
// Linked externally from EmbeddedResources.cpp:
|
||||
extern const uint8_t font_awesome_v6[];
|
||||
extern const size_t font_awesome_v6_size;
|
||||
extern const uint8_t yumin[];
|
||||
extern const size_t yumin_size;
|
||||
|
||||
Reference in New Issue
Block a user