Skip to content

Commit

Permalink
GUI project added with white square
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniPlays committed Mar 22, 2022
1 parent 781af11 commit 57ad054
Show file tree
Hide file tree
Showing 40 changed files with 479 additions and 471 deletions.
2 changes: 2 additions & 0 deletions Dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ IncludeDir["shaderc"] = "%{wks.location}/Hazard/vendor/shaderc/include"
IncludeDir["stb_image"] = "%{wks.location}/Hazard/vendor/stb_image"

IncludeDir["Hazard_Utility"] = "%{wks.location}/Hazard-Utility/src"
IncludeDir["Hazard_Renderer"] = "%{wks.location}/Hazard-Renderer/src"
IncludeDir["Hazard_UI"] = "%{wks.location}/Hazard-UI/src"


LibraryDir = {}
Expand Down
8 changes: 0 additions & 8 deletions Hazard-Renderer/examples/Main.cpp

This file was deleted.

98 changes: 0 additions & 98 deletions Hazard-Renderer/examples/TexturedQuad.cpp

This file was deleted.

107 changes: 0 additions & 107 deletions Hazard-Renderer/examples/Triangle.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion Hazard-Renderer/premake5.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project "Hazard-Renderer"

kind "ConsoleApp"
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "off"
Expand Down
1 change: 1 addition & 0 deletions Hazard-Renderer/src/Core/Pipeline/ShaderFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "Core/Core.h"
#include "Core/RenderContextCreateInfo.h"
#include "Core/Window.h"

#include <filesystem>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion Hazard-Renderer/src/OpenGL/Pipeline/OpenGLShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ namespace HazardRenderer::OpenGL
ShaderFactory::Compile(&compileInfo);

if (!compileInfo.Succeeded()) {
//HZR_CORE_ERROR(compileInfo.Error);
Window::SendDebugMessage({ Severity::Error, compileInfo.Error });
auto binaries = ShaderFactory::GetShaderBinaries(m_FilePath, stage, RenderAPI::OpenGL);
shaderData[stage] = binaries;
continue;
Expand Down
3 changes: 2 additions & 1 deletion Hazard-Renderer/src/Vulkan/Core/VulkanDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ namespace HazardRenderer::Vulkan {
vkGetPhysicalDeviceProperties(m_PhysicalDevice, &props);
m_DeviceName = props.deviceName;

//CreatePools(imagesInFlight); }
//CreatePools(imagesInFlight);
}
VulkanDevice::~VulkanDevice()
{
vkDestroyPipelineCache(m_Device, m_PipelineCache, nullptr);
Expand Down
87 changes: 87 additions & 0 deletions Hazard-UI/premake5.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
project "Hazard-UI"

kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "off"

targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")

files
{
"src/**.h",
"src/**.cpp"
}

includedirs
{
"%{IncludeDir.glm}",
"%{IncludeDir.Hazard_Utility}",
"%{IncludeDir.yaml_cpp}",
"src"
}
links {
"Hazard-Utility",
"Hazard-Renderer"
}

filter "system:windows"
systemversion "latest"
defines {
"HZR_PLATFORM_WINDOWS",
"GLFW_INCLUDE_NONE"
}
links {
"%{Library.Vulkan}",
"%{Library.VulkanUtils}",
"opengl32.lib"
}


filter "system:macos"
systemversion "latest"
defines {
"HZR_PLATFORM_MACOS",
"GLFW_INCLUDE_NONE"
}

filter "configurations:Debug"
defines "HZR_DEBUG"
runtime "Debug"
symbols "on"

if os.host() == "windows" then
links {
"%{Library.ShaderC_Debug}",
"%{Library.SPIRV_Cross_Debug}",
"%{Library.SPIRV_Cross_GLSL_Debug}",
}
end

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


if os.host() == "windows" then
links {
"%{Library.ShaderC_Release}",
"%{Library.SPIRV_Cross_Release}",
"%{Library.SPIRV_Cross_GLSL_Release}",
}
end

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

if os.host() == "windows" then
links {
"%{Library.ShaderC_Release}",
"%{Library.SPIRV_Cross_Release}",
"%{Library.SPIRV_Cross_GLSL_Release}",
}
end
10 changes: 10 additions & 0 deletions Hazard-UI/src/Components/ScreenBounds.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

namespace HazardUI {
class ScreenBounds {
public:



};
}
16 changes: 16 additions & 0 deletions Hazard-UI/src/Core/Anchor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

namespace HazardUI
{
struct Anchor
{
float TopLeft = 0.5f;
float TopRight = 0.5f;
float BottomLeft = 0.5f;
float BottomRight = 0.5f;

Anchor() {};
Anchor(float topLeft, float topRight, float bottomLeft, float bottomRight) : TopLeft(topLeft),
TopRight(topRight), BottomLeft(bottomLeft), BottomRight(BottomRight) {}
};
}
13 changes: 13 additions & 0 deletions Hazard-UI/src/Core/Canvas.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

#include "Canvas.h"

namespace HazardUI {
Canvas::Canvas()
{

}
Canvas::~Canvas()
{

}
}
Loading

0 comments on commit 57ad054

Please sign in to comment.