Merge pull request #61 from MissLavender-LQ/linux-dev

Linux dev
This commit is contained in:
Antoine Pilote
2023-09-27 23:36:26 -04:00
committed by GitHub
9 changed files with 38 additions and 62 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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)
-32
View File
@@ -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);
+3 -3
View File
@@ -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];
+9 -9
View File
@@ -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)