Skip to content

Commit

Permalink
Scene graph + material editor
Browse files Browse the repository at this point in the history
Script sync from SHA: 2939e21ec138fbba8753d8a355a4c40bdb7962e4
  • Loading branch information
mklefrancois committed Oct 2, 2024
1 parent 6f201fb commit 96492c5
Show file tree
Hide file tree
Showing 6 changed files with 317 additions and 161 deletions.
62 changes: 0 additions & 62 deletions src/alloc_dma.h

This file was deleted.

3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ class GltfRendererElement : public nvvkhl::IAppElement
m_tonemapper->onUI();
}

m_scene.onUI(m_resources, m_settings, m_app->getWindowHandle());
if(!m_busy.isBusy())
m_scene.onUI(m_resources, m_settings, m_app->getWindowHandle());
}
ImGui::End(); // Settings

Expand Down
2 changes: 1 addition & 1 deletion src/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void gltfr::Resources::init(VulkanInfo& _ctx)
{
ctx = _ctx;

m_allocator = std::make_unique<AllocDma>(ctx.device, ctx.physicalDevice);
m_allocator = std::make_unique<nvvk::ResourceAllocatorDma>(ctx.device, ctx.physicalDevice);
m_finalImage = std::make_unique<nvvkhl::GBuffer>(ctx.device, m_allocator.get());
m_tempCommandPool = std::make_unique<nvvk::CommandPool>(ctx.device, ctx.GCT0.familyIndex,
VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, ctx.GCT0.queue);
Expand Down
13 changes: 7 additions & 6 deletions src/resources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ It holds the Vulkan resources, such as
*/

// nvpro-core
#include "nvvk/resourceallocator_vk.hpp"
#include "nvvk/context_vk.hpp"
#include "nvvk/commands_vk.hpp"
#include "nvvkhl/gbuffer.hpp"
#include "nvvkhl/glsl_compiler.hpp"

// Local to application
#include "alloc_dma.h"
#include "slang_compiler.hpp"

namespace gltfr {
Expand Down Expand Up @@ -88,11 +89,11 @@ class Resources
// Vulkan context resources
VulkanInfo ctx{};

std::unique_ptr<AllocDma> m_allocator{};
std::unique_ptr<nvvkhl::GBuffer> m_finalImage{}; // G-Buffers: color
std::unique_ptr<nvvk::CommandPool> m_tempCommandPool{};
std::unique_ptr<nvvkhl::GlslCompiler> m_glslC{};
std::unique_ptr<SlangCompiler> m_slangC{};
std::unique_ptr<nvvk::ResourceAllocatorDma> m_allocator{};
std::unique_ptr<nvvkhl::GBuffer> m_finalImage{}; // G-Buffers: color
std::unique_ptr<nvvk::CommandPool> m_tempCommandPool{};
std::unique_ptr<nvvkhl::GlslCompiler> m_glslC{};
std::unique_ptr<SlangCompiler> m_slangC{};

private:
bool m_hasGBufferChanged{false};
Expand Down
Loading

0 comments on commit 96492c5

Please sign in to comment.