Skip to content

Commit 3b67580

Browse files
committed
resolve #900 (comment)
1 parent bfa233f commit 3b67580

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

include/nbl/ext/DebugDraw/builtin/hlsl/aabb_instances.fragment.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma shader_stage(fragment)
22

3-
#include "common.hlsl"
3+
#include "nbl/ext/DebugDraw/builtin/hlsl/common.hlsl"
44

55
using namespace nbl::ext::debug_draw;
66

include/nbl/ext/DebugDraw/builtin/hlsl/aabb_instances.vertex.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "nbl/builtin/hlsl/math/linalg/fast_affine.hlsl"
44
#include "nbl/builtin/hlsl/glsl_compat/core.hlsl"
55
#include "nbl/builtin/hlsl/bda/__ptr.hlsl"
6-
#include "common.hlsl"
6+
#include "nbl/ext/DebugDraw/builtin/hlsl/common.hlsl"
77

88
using namespace nbl::hlsl;
99
using namespace nbl::ext::debug_draw;

include/nbl/ext/DebugDraw/builtin/hlsl/single.vertex.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "nbl/builtin/hlsl/math/linalg/fast_affine.hlsl"
44
#include "nbl/builtin/hlsl/glsl_compat/core.hlsl"
55
#include "nbl/builtin/hlsl/bda/__ptr.hlsl"
6-
#include "common.hlsl"
6+
#include "nbl/ext/DebugDraw/builtin/hlsl/common.hlsl"
77

88
using namespace nbl::hlsl;
99
using namespace nbl::ext::debug_draw;

include/nbl/system/ISystem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class NBL_API2 ISystem : public core::IReferenceCounted
7070
//
7171
virtual inline bool isDirectory(const system::path& p) const
7272
{
73+
// TODO: fix bug, input "nbl/ext/DebugDraw/builtin/hlsl" -> returs true when no such dir present in mounted stuff due to how it uses parent paths in loop (goes up up till matches "nbl" builtin archive and thinks it resolved the requested dir)
7374
if (isPathReadOnly(p))
7475
return p.extension()==""; // TODO: this is a temporary decision until we figure out how to check if a file is directory in android APK
7576
else

src/nbl/ext/DebugDraw/CDrawAABB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ smart_refctd_ptr<IGPUGraphicsPipeline> DrawAABB::createPipeline(SCreationParamet
162162
return params.utilities->getLogicalDevice()->compileShader({ shaderSrc.get() });
163163
};
164164

165-
if (!system->isDirectory(path(NBL_ARCHIVE_ENTRY.data())))
165+
if (!system->exists(path(NBL_ARCHIVE_ENTRY) / "common.hlsl", {}))
166166
mount(smart_refctd_ptr<ILogger>(params.utilities->getLogger()), system.get(), NBL_ARCHIVE_ENTRY);
167167

168168
auto vertexShader = compileShader(vsPath, IShader::E_SHADER_STAGE::ESS_VERTEX);

src/nbl/ext/DebugDraw/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ nbl_create_ext_library_project(
2020
)
2121

2222
# this should be standard for all extensions
23-
set(_ARCHIVE_ENTRY_KEY_ "DebugDraw/builtin/hlsl") # then each one has unique archive key
24-
get_filename_component(_ARCHIVE_ABSOLUTE_ENTRY_PATH_ "${NBL_EXT_INTERNAL_INCLUDE_DIR}/nbl/ext" ABSOLUTE)
23+
set(_ARCHIVE_ENTRY_KEY_ "nbl/ext/DebugDraw/builtin/hlsl") # then each one has unique archive key
24+
get_filename_component(_ARCHIVE_ABSOLUTE_ENTRY_PATH_ "${NBL_EXT_INTERNAL_INCLUDE_DIR}" ABSOLUTE)
2525
get_filename_component(_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
2626
get_filename_component(_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)
2727

0 commit comments

Comments
 (0)