Oops, forgot to stage, see last commit message
This commit is contained in:
parent
817a4de020
commit
6df8188bb8
3
.gitignore
vendored
3
.gitignore
vendored
@ -38,7 +38,8 @@ Thumbs.db
|
||||
.direnv/
|
||||
|
||||
# cache
|
||||
.cache/
|
||||
.cache
|
||||
.cache/*
|
||||
|
||||
# Nix flakes
|
||||
result
|
||||
|
||||
@ -25,6 +25,7 @@ find_package( glfw3 REQUIRED )
|
||||
find_package( glm REQUIRED )
|
||||
find_package( VulkanMemoryAllocator CONFIG REQUIRED )
|
||||
find_package( fmt REQUIRED )
|
||||
find_package( CLI11 REQUIRED )
|
||||
# Shader compilers
|
||||
add_executable (glslang::validator IMPORTED)
|
||||
find_program (
|
||||
@ -42,7 +43,7 @@ set_property (
|
||||
find_program(SLANGC_EXECUTABLE slangc HINTS $ENV{VULKAN_SDK}/bin REQUIRED)
|
||||
|
||||
# CL11
|
||||
add_subdirectory(include/CLI11)
|
||||
#add_subdirectory(include/CLI11)
|
||||
|
||||
# fastgltf because it's not in nixpkgs
|
||||
|
||||
@ -129,6 +130,7 @@ function ( addBinary BINARY_NAME )
|
||||
# Exposes versions
|
||||
BUILD_ID="${ENGINE_VERSION}"
|
||||
)
|
||||
|
||||
if(BINARY_IMGUI)
|
||||
target_include_directories(${BINARY_NAME} PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/include/imgui
|
||||
@ -149,6 +151,7 @@ function ( addBinary BINARY_NAME )
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if(BINARY_LICENSE)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_BINARY_DIR}/${BINARY_NAME})
|
||||
endif()
|
||||
@ -227,7 +230,7 @@ list(
|
||||
lib_list
|
||||
# Libs used
|
||||
glfw
|
||||
fmt
|
||||
fmt::fmt
|
||||
vk-bootstrap
|
||||
vulkan
|
||||
CLI11::CLI11
|
||||
|
||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1790689126,
|
||||
"narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b4fd65b198c599cbe814fcb9f42d25d021595ec9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@ -44,13 +44,14 @@
|
||||
SDL2
|
||||
sdl3
|
||||
fmt
|
||||
imgui
|
||||
cli11
|
||||
#imgui
|
||||
tinyobjloader
|
||||
nlohmann_json
|
||||
tinygltf
|
||||
# fastgltf
|
||||
stb
|
||||
ktx-tools
|
||||
#ktx-tools
|
||||
glm
|
||||
cmake
|
||||
ninja
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
// Current progress
|
||||
// 3 - Graphics Pipeline - Blending
|
||||
// Currently rewriting render images
|
||||
// Todo:
|
||||
// Switch C style types to C++ ones (vk::)
|
||||
|
||||
#include "descriptors.h" // Required for public interface custom allocator
|
||||
#include "Common/Types.h"
|
||||
@ -125,6 +127,7 @@ class Engine {
|
||||
|
||||
// Sum things
|
||||
int prevID = 0;
|
||||
int meshIndex = 0;
|
||||
|
||||
// Mesh
|
||||
VkPipelineLayout _meshPipelineLayout;
|
||||
@ -1535,7 +1538,7 @@ AllocatedBuffer Engine::createBuffer(
|
||||
VmaMemoryUsage memoryUsage
|
||||
) {
|
||||
#ifdef DEBUG
|
||||
_logger.logRAM(ENGINE, EINIT, "Creating a buffer with memory usage {} KiB", (float)allocSize/1024.0f);
|
||||
_logger.logRAM(ENGINE, EINIT, "Creating a buffer with memory usage {} KiB and usage: {}", (float)allocSize/1024.0f, string_VkBufferUsageFlags(usage));
|
||||
_gpuMemusage += allocSize;
|
||||
#endif
|
||||
// Allocate the buffer
|
||||
@ -1820,6 +1823,7 @@ void Engine::buildImgui() {
|
||||
ComputeEffect& selected = backgroundEffects[currentBackgroundEffect];
|
||||
|
||||
ImGui::SliderFloat("Render scale", &renderScale, 0.3f, 1.0f);
|
||||
ImGui::SliderInt("Mesh Index", &meshIndex, 0, 2);
|
||||
|
||||
ImGui::Text(
|
||||
"Selected effect: %s",
|
||||
@ -2080,16 +2084,16 @@ void Engine::drawGeometry(
|
||||
);
|
||||
vkCmdBindIndexBuffer(
|
||||
cmd,
|
||||
testMeshes[2]->meshBuffers.indexBuffer.buffer,
|
||||
testMeshes[meshIndex]->meshBuffers.indexBuffer.buffer,
|
||||
0,
|
||||
VK_INDEX_TYPE_UINT32
|
||||
);
|
||||
|
||||
vkCmdDrawIndexed(
|
||||
cmd,
|
||||
testMeshes[2]->surfaces[0].count,
|
||||
testMeshes[meshIndex]->surfaces[0].count,
|
||||
1,
|
||||
testMeshes[2]->surfaces[0].startIndex,
|
||||
testMeshes[meshIndex]->surfaces[0].startIndex,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user