mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
3
.gitignore
vendored
3
.gitignore
vendored
@@ -854,3 +854,6 @@ bin-int/Debug-windows-x86_64/Nuake/scene.obj.enc
|
||||
bin-int/Debug-windows-x86_64/Nuake/userinterface.obj.enc
|
||||
Editor/recent.json
|
||||
bin-int
|
||||
imgui.ini
|
||||
.vscode/launch.json
|
||||
.directory
|
||||
|
||||
@@ -37,11 +37,11 @@ project 'Soloud'
|
||||
|
||||
filter "system:linux"
|
||||
defines {
|
||||
"WITH_OSS"
|
||||
"WITH_ALSA"
|
||||
}
|
||||
files
|
||||
{
|
||||
"soloud/src/backend/oss/soloud_oss.cpp"
|
||||
"soloud/src/backend/alsa/soloud_alsa.cpp"
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Nuake {
|
||||
m_Soloud = CreateRef<SoLoud::Soloud>();
|
||||
|
||||
// TODO: Sample rate, back end, buffer size, flags.
|
||||
m_Soloud->init();
|
||||
m_Soloud->init(SoLoud::Soloud::CLIP_ROUNDOFF,SoLoud::Soloud::ALSA);
|
||||
|
||||
m_AudioThread = std::thread(&AudioManager::AudioThreadLoop, this);
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Nuake
|
||||
{
|
||||
std::filesystem::path pathObj(fullPath);
|
||||
auto returnvalue = pathObj.parent_path().string();
|
||||
return returnvalue + "\\";
|
||||
return returnvalue + "/";
|
||||
}
|
||||
|
||||
std::string FileSystem::ReadFile(const std::string& path, bool absolute)
|
||||
|
||||
@@ -202,32 +202,6 @@ namespace Nuake
|
||||
static float nammount = 0.0001;
|
||||
static float dbsize = 1.25f;
|
||||
static float feather = 1.0f;
|
||||
ImGui::Begin("DOF Setting");
|
||||
{
|
||||
ImGui::DragFloat("focalDepth", &focalDepth, 0.01f);
|
||||
ImGui::DragFloat("focalLength", &focalLength, 0.01f);
|
||||
ImGui::DragFloat("fstop", &fstop, 0.01f);
|
||||
ImGui::DragInt("samples", &samples, 0.01f);
|
||||
ImGui::DragInt("rings", &rings, 0.01f);
|
||||
ImGui::Checkbox("showFocus", &showFocus);
|
||||
ImGui::Checkbox("manualDof", &manualdof);
|
||||
ImGui::Checkbox("autoFocus", &autoFocus);
|
||||
ImGui::DragInt("rings", &rings, 0.01f);
|
||||
ImGui::DragFloat("ndofstart", &ndofstart, 0.01f);
|
||||
ImGui::DragFloat("ndofDist", &ndofDist, 0.01f);
|
||||
ImGui::DragFloat("fdofstart", &fdofstart, 0.01f);
|
||||
ImGui::DragFloat("fdofdist", &fdofdist, 0.01f);
|
||||
ImGui::DragFloat("coc", &coc, 0.01f);
|
||||
ImGui::DragFloat("maxBlue", &maxBlue, 0.01f);
|
||||
ImGui::DragFloat("threshold", &threshold, 0.01f);
|
||||
ImGui::DragFloat("gain", &gain, 0.01f);
|
||||
ImGui::DragFloat("biaos", &biaos, 0.01f);
|
||||
ImGui::DragFloat("fringe", &fringe, 0.01f);
|
||||
ImGui::DragFloat("nammount", &nammount, 0.01f);
|
||||
ImGui::DragFloat("dbsize", &dbsize, 0.01f);
|
||||
ImGui::DragFloat("feather", &feather, 0.01f);
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
mDOFBuffer->QueueResize(framebuffer.GetSize());
|
||||
mDOFBuffer->Bind();
|
||||
@@ -266,12 +240,6 @@ namespace Nuake
|
||||
}
|
||||
mDOFBuffer->Unbind();
|
||||
|
||||
if (ImGui::Begin("DOF"))
|
||||
{
|
||||
ImGui::Image((void*)mDOFBuffer->GetTexture()->GetID(), ImGui::GetContentRegionAvail(), ImVec2(0, 1), ImVec2(1, 0));
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
if (sceneEnv->BarrelDistortionEnabled)
|
||||
{
|
||||
mBarrelDistortionBuffer->QueueResize(framebuffer.GetSize());
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "src/Resource/StaticResources.h"
|
||||
|
||||
#define LoadEmbeddedShader(file) \
|
||||
m_Shaders[file##_path] = CreateScope<Shader>(file##_path, std::string(file, file + file##_len));
|
||||
m_Shaders[file##_path] = CreateScope<Shader>(file##_path, std::string(reinterpret_cast<const char*>(file), reinterpret_cast<const char*>(file) + file##_len));
|
||||
|
||||
namespace Nuake
|
||||
{
|
||||
@@ -17,7 +17,7 @@ namespace Nuake
|
||||
LoadEmbeddedShader(Resources_Shaders_atmospheric_sky_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_barrel_distortion_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_bloom_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_blur_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_blur_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_BRD_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_combine_shader);
|
||||
LoadEmbeddedShader(Resources_Shaders_copy_shader);
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Nuake {
|
||||
}
|
||||
}
|
||||
|
||||
#define GET_STATIC_RESOURCE_SCRIPT_SRC(name) std::string(name, name + name##_len)
|
||||
#define GET_STATIC_RESOURCE_SCRIPT_SRC(name) std::string(reinterpret_cast<const char*>(name), reinterpret_cast<const char*>(name) + name##_len)
|
||||
|
||||
std::map<std::string, std::string> _ModulesSRC =
|
||||
{
|
||||
@@ -94,8 +94,8 @@ namespace Nuake {
|
||||
{
|
||||
size_t prefixPosition = sname.find(NuakeModulePrefix);
|
||||
sname.erase(prefixPosition, NuakeModulePrefix.length());
|
||||
path = sname;
|
||||
|
||||
path = "Resources/Scripts/"+std::string(sname);
|
||||
|
||||
if (_ModulesSRC.find(sname) != _ModulesSRC.end())
|
||||
{
|
||||
fileContent = _ModulesSRC[sname];
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
strcasecmp(const char* a, const char* b)
|
||||
{
|
||||
#ifdef NK_WIN
|
||||
return _stricmp(a, b);
|
||||
#endif
|
||||
#ifdef NK_LINUX
|
||||
return strcasecmp(a, b);
|
||||
#endif
|
||||
}
|
||||
// strcasecmp(const char* a, const char* b)
|
||||
// {
|
||||
// #ifdef NK_WIN
|
||||
// return _stricmp(a, b);
|
||||
// #endif
|
||||
// #ifdef NK_LINUX
|
||||
// return strcasecmp(a, b);
|
||||
// #endif
|
||||
// }
|
||||
#undef assert
|
||||
#define assert(x)
|
||||
|
||||
|
||||
29
premake5.lua
29
premake5.lua
@@ -121,7 +121,7 @@ project "NuakeRuntime"
|
||||
location "Runtime"
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
|
||||
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
||||
debugdir ("Editor")
|
||||
@@ -144,9 +144,9 @@ project "NuakeRuntime"
|
||||
"%{prj.name}/../Nuake/Dependencies/build",
|
||||
"%{prj.name}/../Nuake/Dependencies/soloud/include"
|
||||
}
|
||||
|
||||
libdirs
|
||||
{
|
||||
|
||||
libdirs
|
||||
{
|
||||
"%{prj.name}/../Nuake/dependencies/assimp/lib/",
|
||||
"%{prj.name}/../Nuake/dependencies/freetype-windows-binaries/release static/win64",
|
||||
"%{prj.name}/../bin/%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}/Nuake/",
|
||||
@@ -159,8 +159,8 @@ project "NuakeRuntime"
|
||||
}
|
||||
|
||||
links
|
||||
{
|
||||
"Nuake",
|
||||
{
|
||||
"Nuake",
|
||||
"GLFW",
|
||||
"glad",
|
||||
"assimp",
|
||||
@@ -183,13 +183,17 @@ project "NuakeRuntime"
|
||||
filter "system:linux"
|
||||
links
|
||||
{
|
||||
"GL"
|
||||
"GL",
|
||||
"glfw",
|
||||
"glad",
|
||||
"X11",
|
||||
"asound",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
runtime "Debug"
|
||||
symbols "on"
|
||||
defines
|
||||
defines
|
||||
{
|
||||
"NK_DEBUG"
|
||||
}
|
||||
@@ -199,7 +203,7 @@ project "NuakeRuntime"
|
||||
runtime "Release"
|
||||
optimize "on"
|
||||
|
||||
defines
|
||||
defines
|
||||
{
|
||||
"NK_DIST",
|
||||
"WIN32_LEAN_AND_MEAN"
|
||||
@@ -213,7 +217,7 @@ project "NuakeRuntime"
|
||||
runtime "Release"
|
||||
optimize "on"
|
||||
flags { "WinMain" }
|
||||
defines
|
||||
defines
|
||||
{
|
||||
"NK_DIST"
|
||||
}
|
||||
@@ -298,7 +302,8 @@ project "Editor"
|
||||
"GL",
|
||||
"glfw",
|
||||
"glad",
|
||||
"X11"
|
||||
"X11",
|
||||
"asound",
|
||||
}
|
||||
|
||||
defines
|
||||
@@ -334,4 +339,4 @@ project "Editor"
|
||||
-- copy a file from the objects directory to the target directory
|
||||
postbuildcommands {
|
||||
--"{COPY} "Nuake/dependencies/GLFW/lib-vc2019/glfw3.dll" " .. "./bin/" .. outputdir .. "/%{prj.name}/glfw3.dll"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user