Skip to content

Commit

Permalink
Working with Nvidia and Intel graphics driver Will not work with AMD …
Browse files Browse the repository at this point in the history
…as of now
  • Loading branch information
AzadKshitij committed Jul 25, 2021
1 parent aa01815 commit 72f51d5
Show file tree
Hide file tree
Showing 20 changed files with 312 additions and 240 deletions.
2 changes: 1 addition & 1 deletion Dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LibraryDir = {}

LibraryDir["VulkanSDK"] = "%{VULKAN_SDK}/Lib"
LibraryDir["VulkanSDK_Debug"] = "%{wks.location}/Triger/vendor/VulkanSDK/Lib"

LibraryDir["VulkanSDK_DebugDLL"] = "%{wks.location}/Triger/vendor/VulkanSDK/Bin"
Library = {}
Library["Vulkan"] = "%{LibraryDir.VulkanSDK}/vulkan-1.lib"
Library["VulkanUtils"] = "%{LibraryDir.VulkanSDK}/VkLayer_utils.lib"
Expand Down
2 changes: 1 addition & 1 deletion Sandbox/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project "Sandbox"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "on"
staticruntime "off"

targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
Expand Down
2 changes: 1 addition & 1 deletion Tridor/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Collapsed=0
DockId=0x0000000A,0

[Docking][Data]
DockSpace ID=0x3BC79352 Window=0x4647B76E Pos=137,191 Size=1280,695 Split=X Selected=0x1C33C293
DockSpace ID=0x3BC79352 Window=0x4647B76E Pos=41,95 Size=1280,695 Split=X Selected=0x1C33C293
DockNode ID=0x00000005 Parent=0x3BC79352 SizeRef=771,994 Split=X
DockNode ID=0x00000001 Parent=0x00000005 SizeRef=298,701 Selected=0x1C33C293
DockNode ID=0x00000003 Parent=0x00000005 SizeRef=980,701 Split=X Selected=0x995B0CF8
Expand Down
15 changes: 15 additions & 0 deletions Tridor/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,27 @@ project "Tridor"
runtime "Debug"
symbols "on"

postbuildcommands
{
"{COPYDIR} \"%{LibraryDir.VulkanSDK_DebugDLL}\" \"%{cfg.targetdir}\""
}

filter "configurations:Release"
defines "TR_RELEASE"
runtime "Release"
optimize "on"

postbuildcommands
{
"{COPYDIR} \"%{LibraryDir.VulkanSDK_DebugDLL}\" \"%{cfg.targetdir}\""
}

filter "configurations:Dist"
defines "TR_DIST"
runtime "Release"
optimize "on"

postbuildcommands
{
"{COPYDIR} \"%{LibraryDir.VulkanSDK_DebugDLL}\" \"%{cfg.targetdir}\""
}
17 changes: 12 additions & 5 deletions Tridor/src/EditorLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include "Log/AppLog.h"
#include "Triger.h"
#include "Triger/Scene/SceneSerializer.h"

#include "Triger/Utils/PlatformUtils.h"

#include "ImGuizmo.h"

#include "Triger/Math/Math.h"

#include "Log/AppLog.h"

#include "ImGuizmo.h"

#include "Triger/Math/Math.h"

namespace Triger
{

Expand Down Expand Up @@ -566,11 +573,11 @@ namespace Triger
}
void EditorLayer::SaveSceneAs()
{
std::optional<std::string> filepath = FileDialogs::SaveFile("Triger Scene (*.triger)\0*.triger\0");
if (filepath)
std::string filepath = FileDialogs::SaveFile("Triger Scene (*.triger)\0*.triger\0");
if (!filepath.empty())
{
SceneSerializer serializer(m_ActiveScene);
serializer.Serialize(*filepath);
serializer.Serialize(filepath);
}
}

Expand Down
1 change: 0 additions & 1 deletion Tridor/src/EditorLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "Triger.h"
#include "Panels/SceneHierarchyPanel.h"
#include "Triger/Renderer/EditorCamera.h"

namespace Triger
{
Expand Down
2 changes: 1 addition & 1 deletion Triger/src/Triger/Core/Assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{ \
if (!(check)) \
{ \
HZ##type##ERROR(msg, __VA_ARGS__); \
TR##type##ERROR(msg, __VA_ARGS__); \
TR_DEBUGBREAK(); \
} \
}
Expand Down
2 changes: 1 addition & 1 deletion Triger/src/Triger/Debug/Instrumentor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <sstream>
#include "Triger/Core/Log.h"

namespace Triger
namespace Triger
{

using FloatingPointMicroseconds = std::chrono::duration<double, std::micro>;
Expand Down
4 changes: 2 additions & 2 deletions Triger/src/Triger/Platform/Linux/LinuxWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Created By : Azad Kshitij @AzadKshitij
//--------------------------------------------------------------------------*/

#pragma one
#pragma once

#include "Triger/Core/Window.h"
#include "Triger/Renderer/GraphicsContext.h"
Expand Down Expand Up @@ -57,4 +57,4 @@ namespace Triger

WindowData m_Data;
};
}
}
2 changes: 1 addition & 1 deletion Triger/src/Triger/Platform/OpenGL/OpenGLRendererAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ namespace Triger
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, nullptr);
glBindTexture(GL_TEXTURE_2D, 0);
}
}
}
Loading

0 comments on commit 72f51d5

Please sign in to comment.