Skip to content

Commit 0946b90

Browse files
add example 09, start with making a default renderpass that has a depth buffer
1 parent 870e1d5 commit 0946b90

File tree

7 files changed

+563
-137
lines changed

7 files changed

+563
-137
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
include(common RESULT_VARIABLE RES)
2+
if(NOT RES)
3+
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
4+
endif()
5+
6+
nbl_create_executable_project("" "" "" "" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}")
7+
8+
if(NBL_EMBED_BUILTIN_RESOURCES)
9+
set(_BR_TARGET_ ${EXECUTABLE_NAME}_builtinResourceData)
10+
set(RESOURCE_DIR "app_resources")
11+
12+
get_filename_component(_SEARCH_DIRECTORIES_ "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
13+
get_filename_component(_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
14+
get_filename_component(_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)
15+
16+
file(GLOB_RECURSE BUILTIN_RESOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}/*")
17+
foreach(RES_FILE ${BUILTIN_RESOURCE_FILES})
18+
LIST_BUILTIN_RESOURCE(RESOURCES_TO_EMBED "${RES_FILE}")
19+
endforeach()
20+
21+
ADD_CUSTOM_BUILTIN_RESOURCES(${_BR_TARGET_} RESOURCES_TO_EMBED "${_SEARCH_DIRECTORIES_}" "${RESOURCE_DIR}" "nbl::this_example::builtin" "${_OUTPUT_DIRECTORY_HEADER_}" "${_OUTPUT_DIRECTORY_SOURCE_}")
22+
23+
LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} ${_BR_TARGET_})
24+
endif()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright (C) 2024-2024 - DevSH Graphics Programming Sp. z O.O.
2+
// This file is part of the "Nabla Engine".
3+
// For conditions of distribution and use, see copyright notice in nabla.h
4+
5+
struct push_constants_t
6+
{
7+
uint16_t2 grid;
8+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"enableParallelBuild": true,
3+
"threadsPerBuildProcess" : 2,
4+
"isExecuted": false,
5+
"scriptPath": "",
6+
"cmake": {
7+
"configurations": [ "Release", "Debug", "RelWithDebInfo" ],
8+
"buildModes": [],
9+
"requiredOptions": []
10+
},
11+
"profiles": [
12+
{
13+
"backend": "vulkan",
14+
"platform": "windows",
15+
"buildModes": [],
16+
"runConfiguration": "Release",
17+
"gpuArchitectures": []
18+
}
19+
],
20+
"dependencies": [],
21+
"data": [
22+
{
23+
"dependencies": [],
24+
"command": [""],
25+
"outputs": []
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)