-
Notifications
You must be signed in to change notification settings - Fork 13
Mesh loaders #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Mesh loaders #197
Conversation
…ek's help Yes geometry creator scene default SPIR-V shaders are gone
… tmp trick #include "nbl/examples/common/SimpleWindowedApplication.hpp" #include "nbl/examples/common/InputSystem.hpp" #include "nbl/examples/common/CEventCallback.hpp" #include "nbl/examples/cameras/CCamera.hpp"
…ncluded in PCH now though the example doesn't compile anyway (misses imgui link and more)
… into project to allow build all at once
// TODO: @AnastaZIuk do we even make that explicit? | ||
#include "nbl/examples/PCH.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples/examples
nbl_create_executable_project("${NBL_EXTRA_SOURCES}" "" "${NBL_INCLUDE_SERACH_DIRECTORIES}" "${NBL_LIBRARIES}" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}") | ||
LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} geometryCreatorSpirvBRD) | ||
|
||
# TODO; Arek I removed `NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET` from the last parameter here, doesn't this macro have 4 arguments anyway !? | ||
nbl_create_executable_project("${NBL_EXTRA_SOURCES}" "" "${NBL_INCLUDE_SERACH_DIRECTORIES}" "${NBL_LIBRARIES}") | ||
# TODO: Arek temporarily disabled cause I haven't figured out how to make this target yet | ||
# LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} nblExamplesGeometrySpirvBRD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
touch up in #196
nbl_create_executable_project("" "" "${NBL_INCLUDE_SERACH_DIRECTORIES}" "" "") | ||
# TODO: Arek temporarily disabled cause I haven't figured out how to make this target yet | ||
# LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} nblExamplesGeometrySpirvBRD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnastaZIuk touch up #196
@@ -1 +0,0 @@ | |||
add_subdirectory(creator EXCLUDE_FROM_ALL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnastaZIuk use n4ce tool here
# header only currently | ||
|
||
#set(NBL_EXAMPLES_CAMERA_LIB_SOURCES | ||
# "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" | ||
#) | ||
|
||
#nbl_create_ext_library_project(ExampleCameras "" "${NBL_EXAMPLES_CAMERA_LIB_SOURCES}" "" "" "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnastaZIuk write example code how to deal with this
I'd add sources to PARENT_SCOPE Common target not make new static libs, to avoid 1GB PCH per lib.
Use `ICPUPolygonGeometry::exportForBLAS` to make the Triangle Geometries https://github.com/Devsh-Graphics-Programming/Nabla/blob/1f52d2f48ff077cb430cc78285fb12dd7e093f74/include/nbl/asset/IPolygonGeometry.h#L209
…ude/nbl/examples` under `nbl/examples` either as dir or builtin archive
struct ObjectDrawHookCpu | ||
{ | ||
nbl::core::matrix3x4SIMD model; | ||
ObjectMeta meta; | ||
}; | ||
|
||
struct ReferenceObjectCpu | ||
{ | ||
ObjectMeta meta; | ||
core::smart_refctd_ptr<ICPUPolygonGeometry> data; | ||
Material material; | ||
core::matrix3x4SIMD transform; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that stuff is old and disgusting clean up a bit
… the examples which are WIP on this branch
…les_tests w.r.t. the question of `MonoAssetManagerAndBuiltinResourceApplication.hpp` There really isn't a usecase for: - embedding Nabla resources but not embedding example (there's no harm in Nabla resources not being embedded) - even more strangely, not embedding Nabla resources, but embedding example.
#include "../../common/include/WorkgroupDataAccessors.hlsl" | ||
#include "nbl/examples/workgroup/DataAccessors.hlsl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnastaZIuk I need help here, the NblExamples project also needs to have its own builtins thing for HLSL headers
add_subdirectory(67_RayQueryGeometry EXCLUDE_FROM_ALL) # TODO: resurrect before `mesh_loaders` merge | ||
add_subdirectory(68_JpegLoading) | ||
|
||
add_subdirectory(70_FLIPFluids EXCLUDE_FROM_ALL) | ||
add_subdirectory(71_RayTracingPipeline EXCLUDE_FROM_ALL) | ||
add_subdirectory(70_FLIPFluids) | ||
add_subdirectory(71_RayTracingPipeline EXCLUDE_FROM_ALL) # TODO: resurrect before `mesh_loaders` merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevyuu in your PR with fixes for 67 and 71, you need to remove those EXCLUDE_FROM_ALL
// TODO: Arek bring back | ||
//#include "nbl/examples/geometry/spirv/builtin/CArchive.h" | ||
//#include "nbl/examples/geometry/spirv/builtin/builtinResources.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there could just be one general builtin archive for nbl/examples
const auto bundle = assMan->getAsset("nbl/examples/geometry/shaders/unified.hlsl",{}); | ||
// TODO: Arek | ||
//const auto bundle = assMan->getAsset("nbl/examples/geometry/shaders/unified.spv",{}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnastaZIuk n4ce tool in 2 configs:
- read spir-v from disk (build directory of example, but mounted)
- read spir-v from builtin
but we always use nsc.exe to do a build step to produce the spirv
09_GeometryCreator/main.cpp
Outdated
// TODO: this is plain wrong Arek | ||
m_system->mount(make_smart_refctd_ptr<system::CMountDirectoryArchive>(localInputCWD/"../common/include/nbl/examples",smart_refctd_ptr(m_logger),m_system.get()),"nbl/examples"); | ||
m_system->mount(make_smart_refctd_ptr<system::CMountDirectoryArchive>(localInputCWD/"../common/src/nbl/examples",smart_refctd_ptr(m_logger),m_system.get()),"nbl/examples"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnastaZIuk I think I'll handle this in MonoAssetManagerAndBuiltinResourceApplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw when embed resources is OFF, these should be mounted AND corresponding build dir which I guess will be just src/nbl/examples
but somewhere in build dir (if there's for example SPIR-V being made with NSC from stuff in src/nbl/examples
…ceApplication` in two
…treatment to NOT include `this_example/CArchive`
// TODO: make the `this_example` optional, only if the example has builtins | ||
#include "nbl/this_example/builtin/CArchive.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YasInvolved I think this can be done with __has_include
https://en.cppreference.com/w/cpp/preprocessor/include
No description provided.