Enabled multithreaded compilation and fixed some build warnings
Enabled MT compilation for all first party TUs and some third party ones too. Disabled specific warnings in third party code, started fixing warnings in first party code as well
This commit is contained in:
@@ -50,7 +50,7 @@ public:
|
||||
{
|
||||
ImGui::Text("Stick to floor step down");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::DragFloat("##StickToFloorStepDown", &component.StickToFloorStepDown.y, -10.0f, 0.01, 0.0f);
|
||||
ImGui::DragFloat("##StickToFloorStepDown", &component.StickToFloorStepDown.y, -10.0f, 0.01f, 0.0f);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.StickToFloorStepDown.y, -0.5f);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
{
|
||||
ImGui::Text("Step down extra");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::DragFloat("##StepDownExtra", &component.StepDownExtra.y, -10.0f, 0.01, 0.0f);
|
||||
ImGui::DragFloat("##StepDownExtra", &component.StepDownExtra.y, -10.0f, 0.01f, 0.0f);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.StepDownExtra.y, 0.0f);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
{
|
||||
ImGui::Text("Step up");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::DragFloat("##StepUp", &component.SteppingStepUp.y, 0.0f, 0.01, 10.0f);
|
||||
ImGui::DragFloat("##StepUp", &component.SteppingStepUp.y, 0.0f, 0.01f, 10.0f);
|
||||
ImGui::TableNextColumn();
|
||||
ComponentTableReset(component.SteppingStepUp.y, 0.4f);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ ImGui::Text(##name);
|
||||
bool removed = false; \
|
||||
bool headerOpened = ImGui::CollapsingHeader(#name, ImGuiTreeNodeFlags_DefaultOpen); \
|
||||
ImGui::PopStyleVar(); \
|
||||
if (#name != "TRANSFORM" && ImGui::BeginPopupContextItem()) \
|
||||
if (strcmp(#name, "TRANSFORM") != 0 && ImGui::BeginPopupContextItem()) \
|
||||
{ \
|
||||
if (ImGui::Selectable("Remove")) { removed = true; } \
|
||||
ImGui::EndPopup(); \
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
auto animations = model->GetAnimations();
|
||||
if (ImGui::BeginCombo("Type", model->GetCurrentAnimation()->GetName().c_str()))
|
||||
{
|
||||
for (int n = 0; n < model->GetAnimationsCount(); n++)
|
||||
for (uint32_t n = 0; n < model->GetAnimationsCount(); n++)
|
||||
{
|
||||
bool is_selected = (animIndex == n);
|
||||
std::string animName = animations[n]->GetName();
|
||||
|
||||
@@ -6,7 +6,7 @@ void ImGuiTextSTD(const std::string& label, std::string& value)
|
||||
{
|
||||
char buffer[256];
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
std::strncpy(buffer, value.c_str(), sizeof(buffer));
|
||||
strncpy_s(buffer, value.c_str(), sizeof(buffer));
|
||||
if (ImGui::InputText(label.c_str(), buffer, sizeof(buffer)))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ void ImGuiTextMultiline(const std::string& label, std::string& value)
|
||||
{
|
||||
char buffer[256];
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
std::strncpy(buffer, value.c_str(), sizeof(buffer));
|
||||
strncpy_s(buffer, value.c_str(), sizeof(buffer));
|
||||
if (ImGui::InputTextMultiline(label.c_str(), buffer, sizeof(buffer)))
|
||||
{
|
||||
value = std::string(buffer);
|
||||
|
||||
@@ -645,12 +645,12 @@ namespace Nuake {
|
||||
float frameTime = 1000.0f / io.Framerate;
|
||||
int fps = (int)io.Framerate;
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1, 0.1, 0.1, 1));
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1f, 0.1f, 0.1f, 1));
|
||||
ImGui::BeginChild("FPS", ImVec2(70, 30), false);
|
||||
|
||||
std::string text = std::to_string(fps) + " fps";
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetContentRegionAvail().x / 1.25 - ImGui::CalcTextSize(text.c_str()).x
|
||||
- ImGui::GetScrollX() - 2 * ImGui::GetStyle().ItemSpacing.x);
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetContentRegionAvail().x / 1.25f - ImGui::CalcTextSize(text.c_str()).x
|
||||
- ImGui::GetScrollX() - 2.f * ImGui::GetStyle().ItemSpacing.x);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 15 - (ImGui::CalcTextSize(text.c_str()).y) / 2.0);
|
||||
ImGui::Text(text.c_str());
|
||||
|
||||
@@ -953,9 +953,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(SKY);
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1169,9 +1169,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(BLOOM)
|
||||
if (ImGui::BeginTable("BloomTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1236,9 +1236,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(VOLUMETRIC)
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1318,9 +1318,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(SSAO)
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
@@ -1810,9 +1810,9 @@ namespace Nuake {
|
||||
BEGIN_COLLAPSE_HEADER(BARREL_DISTORTION)
|
||||
if (ImGui::BeginTable("EnvTable", 3, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingStretchProp))
|
||||
{
|
||||
ImGui::TableSetupColumn("name", 0, 0.3);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1);
|
||||
ImGui::TableSetupColumn("name", 0, 0.3f);
|
||||
ImGui::TableSetupColumn("set", 0, 0.6f);
|
||||
ImGui::TableSetupColumn("reset", 0, 0.1f);
|
||||
|
||||
{
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
@@ -77,7 +77,7 @@ void EditorSelectionPanel::Draw(EditorSelection selection)
|
||||
ImGui::SetCursorPosX((windowWidth - textWidth) * 0.5f);
|
||||
ImGui::SetCursorPosY((windowHeight - textHeight) * 0.5f);
|
||||
|
||||
ImGui::TextColored({1, 0.1, 0.1, 1.0}, text.c_str());
|
||||
ImGui::TextColored({1.f, 0.1f, 0.1f, 1.0f}, text.c_str());
|
||||
}
|
||||
|
||||
DrawFile(selection.File);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Nuake
|
||||
ImGui::PopStyleVar();
|
||||
}
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1, 0.1, 0.1, 0.2f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.1f, 0.1f, 0.1f, 0.2f));
|
||||
ImGui::BeginChild("TemplateContainer", { ImGui::GetContentRegionAvail().x - 64.0f, ImGui::GetContentRegionAvail().y }, true, ImGuiChildFlags_AlwaysUseWindowPadding);
|
||||
{
|
||||
ImGui::Dummy({ 4, 4 });
|
||||
@@ -94,7 +94,7 @@ namespace Nuake
|
||||
if (showTitleEmptyWarning && projectTitle.empty())
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored({ 1.0, 0.1, 0.1, 1.0 }, ICON_FA_EXCLAMATION_TRIANGLE);
|
||||
ImGui::TextColored({ 1.0f, 0.1f, 0.1f, 1.0f }, ICON_FA_EXCLAMATION_TRIANGLE);
|
||||
|
||||
Nuake::UI::Tooltip("Title required");
|
||||
}
|
||||
|
||||
@@ -184,11 +184,11 @@ void ProjectSettingsCategoryPhysics::Draw()
|
||||
Engine::SetPhysicsStep(Engine::GetProject()->Settings.PhysicsStep);
|
||||
}
|
||||
|
||||
ImGui::DragInt("Maximum SubSteps", &Engine::GetProject()->Settings.MaxPhysicsSubStep, 1.0f, 8.0f, 128);
|
||||
ImGui::DragInt("Maximum SubSteps", &Engine::GetProject()->Settings.MaxPhysicsSubStep, 1, 8, 128);
|
||||
|
||||
ImGui::DragInt("Maximum Bodies", &Engine::GetProject()->Settings.MaxPhysicsBodies, 1.0f, 256.0f, 8000);
|
||||
ImGui::DragInt("Maximum Body Pair", &Engine::GetProject()->Settings.MaxPhysicsBodyPair, 1.0f, 256.0f, 4096.0f);
|
||||
ImGui::DragInt("Maximum Contact Constraint", &Engine::GetProject()->Settings.MaxPhysicsContactConstraints, 1.0f, 256.0f, 4096.0f);
|
||||
ImGui::DragInt("Maximum Bodies", &Engine::GetProject()->Settings.MaxPhysicsBodies, 1.0f, 256, 8000);
|
||||
ImGui::DragInt("Maximum Body Pair", &Engine::GetProject()->Settings.MaxPhysicsBodyPair, 1.0f, 256, 4096);
|
||||
ImGui::DragInt("Maximum Contact Constraint", &Engine::GetProject()->Settings.MaxPhysicsContactConstraints, 1.0f, 256, 4096);
|
||||
}
|
||||
|
||||
ProjectSettingsCategoryAudio::ProjectSettingsCategoryAudio(Ref<Nuake::Project> project) :
|
||||
|
||||
@@ -120,6 +120,13 @@ project 'assimp'
|
||||
'ASSIMP_BUILD_NO_ASSJSON_EXPORTER'
|
||||
}
|
||||
|
||||
-- When building any Visual Studio solution
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
|
||||
@@ -62,6 +62,13 @@ project "Freetype"
|
||||
filter "system:windows"
|
||||
systemversion "latest"
|
||||
|
||||
-- warning C4244: 'function': conversion from '__int64' to 'const unsigned int', possible loss of data
|
||||
-- warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead
|
||||
-- warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead.
|
||||
-- warning C4267: '=': conversion from 'size_t' to 'FT_Int', possible loss of data
|
||||
-- warning C4312: 'type cast': conversion from 'unsigned long' to 'void *' of greater size
|
||||
disablewarnings { "4996", "4267", "4244", "4312" }
|
||||
|
||||
defines
|
||||
{
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ project "GLFW"
|
||||
"_GLFW_WIN32",
|
||||
}
|
||||
|
||||
disablewarnings { "4996" }
|
||||
|
||||
|
||||
filter "system:linux"
|
||||
staticruntime "On"
|
||||
|
||||
@@ -36,6 +36,14 @@ project 'JoltPhysics'
|
||||
prebuildcommands {
|
||||
"cp %{prj.location}./Jolt.cpp %{prj.location}/"
|
||||
}
|
||||
|
||||
-- When building any Visual Studio solution
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
cppdialect "C++17"
|
||||
runtime "Debug"
|
||||
|
||||
@@ -33,6 +33,13 @@ project 'msdf-gen'
|
||||
|
||||
}
|
||||
|
||||
-- When building any Visual Studio solution
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
|
||||
@@ -25,6 +25,13 @@ project 'yoga'
|
||||
defines {
|
||||
}
|
||||
|
||||
-- When building any Visual Studio solution
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
|
||||
namespace Nuake
|
||||
{
|
||||
struct TransformComponent;
|
||||
struct LightComponent;
|
||||
|
||||
struct Light
|
||||
{
|
||||
TransformComponent transform;
|
||||
|
||||
16
premake5.lua
16
premake5.lua
@@ -211,6 +211,11 @@ project "Nuake"
|
||||
"NK_WIN"
|
||||
}
|
||||
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
@@ -308,6 +313,12 @@ project "NuakeRuntime"
|
||||
'{COPYFILE} "%{wks.location}/Nuake/dependencies/Coral/Coral.Managed/Coral.Managed.runtimeconfig.json" "%{wks.location}/%{prj.name}"'
|
||||
}
|
||||
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "system:linux"
|
||||
links
|
||||
{
|
||||
@@ -471,6 +482,11 @@ project "Editor"
|
||||
'{COPYFILE} "%{wks.location}/Nuake/dependencies/Coral/Coral.Managed/bin/%{cfg.buildcfg}/Coral.Managed.dll" "%{wks.location}/%{prj.name}"'
|
||||
}
|
||||
|
||||
filter { "system:windows", "action:vs*"}
|
||||
flags
|
||||
{
|
||||
"MultiProcessorCompile",
|
||||
}
|
||||
|
||||
filter "system:linux"
|
||||
links
|
||||
|
||||
Reference in New Issue
Block a user