Fixing lvalue errors on linux build

nfd is not yet linking on Linux
main
Nigel Barink 2023-05-13 21:32:55 +02:00
parent f7e087ee8d
commit 95f77209cf
6 changed files with 26 additions and 13 deletions

View File

@ -7,7 +7,7 @@ links{
"YoggieEngine",
"ImGuizmo",
"yaml-cpp",
"nfd.lib"
"nfd"
}
includedirs{

View File

@ -1,7 +1,7 @@
#pragma once
#include "../../YoggieEngine/src/YoggieEngine.h"
#include "EditorWindow.h"
#include "AssetManagement/AssetRegistry.h"
#include "../EditorWindow.h"
#include "AssetRegistry.h"
const char* hidden_extensions [] {
".exe",
@ -39,7 +39,9 @@ public:
continue;
Asset asset(filepath.filename().string().c_str());
asset.setFilPath(filepath.string());
auto filepathStr = filepath.string();
asset.setFilPath(filepathStr);
spdlog::info("Created asset: {0}", asset.GetName());
files.push_back(asset);

View File

@ -7,7 +7,6 @@
#include <nfd.h>
#include "AssetManagement/SceneSerializer.h"
#include "AssetManagement/AssetRegistry.h"
#include "AssetManagement/AssetFinder.h"
#include "PropertyPanels/Inspector.h"
#include "AssetManagement/uuid.h"
@ -52,7 +51,11 @@ public:
project.setProjectDirectory(path);
assetsView = AssetFinder(project.GetProjectDirectory());
LoadLastOrEmptyProject();
cube = (ModelLoader()).LoadAsset(std::filesystem::path("build/debug/Models/cube.obj"));
auto cubePath = std::filesystem::path("build/debug/Models/cube.obj");
cube = (ModelLoader()).LoadAsset(cubePath);
//Settings settings = Settings();
//Console console = Console();
@ -389,14 +392,16 @@ public:
ImGuizmo::SetRect(ImGui::GetWindowPos().x, ImGui::GetWindowPos().y, ImGui::GetWindowWidth(), ImGui::GetWindowHeight());
const auto& ProjMatrix = camera->projection;
glm::mat4& cameraView = glm::inverse(((EditorCamera*)camera)->view);
const glm::mat4& viewMatrix = ((EditorCamera*)camera)->view;
glm::mat4 cameraView = glm::inverse(viewMatrix);
glm::mat4 cameraDelta = glm::mat4(1.0f);
auto& tc = Selected.GetComponent<YoggieEngine::TransformComponent>();
glm::mat4& transform = tc.GetTransform();
auto transform = tc.GetTransform();
ImGuizmo::Manipulate(glm::value_ptr(cameraView), glm::value_ptr(ProjMatrix), activeOperation, ImGuizmo::WORLD, glm::value_ptr(transform), nullptr, nullptr);
if(ImGuizmo::IsUsing())
tc.Decompose(transform);

View File

@ -9,7 +9,8 @@ public:
void Update()
{
ImGui::Begin(name.c_str(), false, flags);
ImGui::Begin(name.c_str(), nullptr, flags);
Draw();
ImGui::End();
}

View File

@ -68,8 +68,13 @@ namespace YAML {
{
if (!node.IsMap())
return false;
rhs.setName(node["Project"].as<std::string>());
rhs.setProjectDirectory(node["Directory"].as<std::string>());
std::string projectName = node["Project"].as<std::string>();
rhs.setName(projectName);
std::string projectDirectory = node["Directory"].as<std::string>();
rhs.setProjectDirectory(projectDirectory);

View File

@ -20,11 +20,11 @@ workspace "Yoggie GameEngine"
}
filter "configurations:Debug"
defines {"DEBUG"}
defines {"DEBUG", "_DEBUG"}
symbols "On"
filter "configurations:Release"
defines {"NDEBUG"}
defines {"NDEBUG", "_DEBUG"}
optimize "On"