Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Feature headless #384

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
16 changes: 5 additions & 11 deletions src/d3d12/d3d12_renderer.cpp
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ namespace wr
SetName(m_compute_queue, L"Default D3D12 Compute Command Queue");
SetName(m_copy_queue, L"Default D3D12 Copy Command Queue");

if (window.has_value())
if (window.has_value() && window.value()->HasPhysicalWindow())
{
m_render_window = d3d12::CreateRenderWindow(m_device, window.value()->GetWindowHandle(), m_direct_queue, d3d12::settings::num_back_buffers);
}
@@ -159,7 +159,7 @@ namespace wr
m_raytracing_offset_sb_pool = CreateStructuredBufferPool(rt_offset_align_size);

// Begin Recording
auto frame_idx = m_render_window.has_value() ? m_render_window.value()->m_frame_idx : 0;
auto frame_idx = GetFrameIdx();
d3d12::Begin(m_direct_cmd_list, frame_idx);

// Stage fullscreen quad
@@ -304,6 +304,8 @@ namespace wr
// Optional CPU-visible copy of the render target pixel data
const auto cpu_output_texture = frame_graph.GetOutputTexture();

++frame_counter;

// Optional CPU-visible copy of the render target pixel and/or depth data
return frame_graph.GetOutputTexture();
}
@@ -997,13 +999,6 @@ namespace wr
{
d3d12::Begin(m_direct_cmd_list, frame_idx);

if (clear_frame_buffer)
{
CD3DX12_CPU_DESCRIPTOR_HANDLE rtv_descriptor(m_render_window.value()->m_rtv_descriptor_heap->GetCPUDescriptorHandleForHeapStart());

rtv_descriptor.Offset(frame_idx, m_render_window.value()->m_rtv_descriptor_increment_size);
}

for (int i = 0; i < m_structured_buffer_pools.size(); ++i)
{
m_structured_buffer_pools[i]->UpdateBuffers(m_direct_cmd_list, frame_idx);
@@ -1285,8 +1280,7 @@ namespace wr
}
else
{
LOGW("Called `D3D12RenderSystem::GetFrameIdx` without a window!");
return 0;
return frame_counter % d3d12::settings::num_back_buffers;
}
}

1 change: 1 addition & 0 deletions src/d3d12/d3d12_renderer.hpp
Original file line number Diff line number Diff line change
@@ -305,6 +305,7 @@ namespace wr
MaterialHandle m_last_material = { nullptr, 0 };

bool m_skybox_changed = false;
std::uint32_t frame_counter = 0;

};

3 changes: 1 addition & 2 deletions src/render_tasks/d3d12_cubemap_convolution.hpp
Original file line number Diff line number Diff line change
@@ -138,11 +138,10 @@ namespace wr

if (radiance->m_is_staged)
{
if (n_render_system.m_render_window.has_value())
{
auto cmd_list = fg.GetCommandList<d3d12::CommandList>(handle);
const auto viewport = d3d12::CreateViewport(static_cast<int>(irradiance->m_width), static_cast<int>(irradiance->m_height));
const auto frame_idx = n_render_system.GetRenderWindow()->m_frame_idx;
const auto frame_idx = n_render_system.GetFrameIdx();

d3d12::BindViewport(cmd_list, viewport);
d3d12::BindPipeline(cmd_list, data.in_pipeline);
1 change: 0 additions & 1 deletion src/render_tasks/d3d12_deferred_composition.cpp
Original file line number Diff line number Diff line change
@@ -251,7 +251,6 @@ namespace wr
}
}

if (n_render_system.m_render_window.has_value())
{
const auto viewport = n_render_system.m_viewport;
const auto frame_idx = n_render_system.GetFrameIdx();
3 changes: 1 addition & 2 deletions src/render_tasks/d3d12_deferred_main.hpp
Original file line number Diff line number Diff line change
@@ -58,10 +58,9 @@ namespace wr
auto& data = fg.GetData<DeferredMainTaskData>(handle);
auto cmd_list = fg.GetCommandList<d3d12::CommandList>(handle);

if (n_render_system.m_render_window.has_value())
{
const auto viewport = n_render_system.m_viewport;
const auto frame_idx = n_render_system.GetRenderWindow()->m_frame_idx;
const auto frame_idx = n_render_system.GetFrameIdx();

d3d12::BindViewport(cmd_list, viewport);
d3d12::BindPipeline(cmd_list, data.in_pipeline);
3 changes: 1 addition & 2 deletions src/render_tasks/d3d12_equirect_to_cubemap.hpp
Original file line number Diff line number Diff line change
@@ -209,11 +209,10 @@ namespace wr
d3d12::TextureResource* equirect_text = static_cast<d3d12::TextureResource*>(data.in_equirect.m_pool->GetTextureResource(data.in_equirect));
d3d12::TextureResource* cubemap_text = static_cast<d3d12::TextureResource*>(data.out_cubemap.m_pool->GetTextureResource(data.out_cubemap));

if (n_render_system.m_render_window.has_value())
{
auto cmd_list = fg.GetCommandList<d3d12::CommandList>(handle);
const auto viewport = d3d12::CreateViewport(static_cast<int>(cubemap_text->m_width), static_cast<int>(cubemap_text->m_height));
const auto frame_idx = n_render_system.GetRenderWindow()->m_frame_idx;
const auto frame_idx = n_render_system.GetFrameIdx();

d3d12::BindViewport(cmd_list, viewport);
d3d12::BindPipeline(cmd_list, data.in_pipeline);
3 changes: 1 addition & 2 deletions src/render_tasks/d3d12_imgui_render_task.hpp
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ namespace wr
{
auto& n_render_system = static_cast<D3D12RenderSystem&>(rs);

if (!n_render_system.m_window.has_value())
if (!n_render_system.m_window.has_value() || !n_render_system.m_window.value()->HasPhysicalWindow())
{
LOGC("Tried using imgui without a window!");
}
@@ -91,7 +91,6 @@ namespace wr
auto cmd_list = fg.GetCommandList<d3d12::CommandList>(handle);

// Temp rendering
if (n_render_system.m_render_window.has_value())
{
auto frame_idx = n_render_system.GetFrameIdx();

14 changes: 6 additions & 8 deletions src/render_tasks/d3d12_path_tracer.hpp
Original file line number Diff line number Diff line change
@@ -39,9 +39,9 @@ namespace wr
d3d12::AccelerationStructure out_tlas = {};

// Shader tables
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_raygen_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_miss_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_hitgroup_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_raygen_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_miss_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_hitgroup_shader_table = { };

// Pipeline objects
d3d12::StateObject* out_state_object = nullptr;
@@ -195,10 +195,9 @@ namespace wr
auto& rt_registry = RTPipelineRegistry::Get();
data.out_state_object = static_cast<d3d12::StateObject*>(rt_registry.Find(state_objects::path_tracer_state_object));

// Create Shader Tables
CreateShaderTables(device, data, 0);
CreateShaderTables(device, data, 1);
CreateShaderTables(device, data, 2);
// Create Shader Tables
for (int i = 0; i < d3d12::settings::num_back_buffers; ++i)
CreateShaderTables(device, data, i);
}

}
@@ -246,7 +245,6 @@ namespace wr
// Wait for AS to be built
d3d12::UAVBarrierAS(cmd_list, as_build_data.out_tlas, frame_idx);

if (n_render_system.m_render_window.has_value())
{
d3d12::BindRaytracingPipeline(cmd_list, data.out_state_object, d3d12::GetRaytracingType(device) == RaytracingType::FALLBACK);

18 changes: 8 additions & 10 deletions src/render_tasks/d3d12_raytracing_task.hpp
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#pragma once

#include "../d3d12/d3d12_renderer.hpp"
#include "../d3d12/d3d12_functions.hpp"
@@ -38,9 +38,9 @@ namespace wr
{
d3d12::AccelerationStructure out_tlas;

std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_raygen_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_miss_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_hitgroup_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_raygen_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_miss_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_hitgroup_shader_table = { };
d3d12::StateObject* out_state_object = nullptr;
d3d12::RootSignature* out_root_signature = nullptr;
D3D12ConstantBufferHandle* out_cb_camera_handle = nullptr;
@@ -151,15 +151,13 @@ namespace wr

data.tlas_requires_init = true;

CreateShaderTables(device, data, 0);
CreateShaderTables(device, data, 1);
CreateShaderTables(device, data, 2);
for(int i = 0; i < d3d12::settings::num_back_buffers; ++i)
CreateShaderTables(device, data, i);
}

for (auto frame_idx = 0; frame_idx < 1; frame_idx++)
{
d3d12::DescHeapCPUHandle desc_handle = data.out_uav_from_rtv.GetDescriptorHandle();
d3d12::CreateUAVFromSpecificRTV(n_render_target, desc_handle, frame_idx, n_render_target->m_create_info.m_rtv_formats[frame_idx]);
d3d12::CreateUAVFromSpecificRTV(n_render_target, desc_handle, 0, n_render_target->m_create_info.m_rtv_formats[0]);
}
}

@@ -184,7 +182,6 @@ namespace wr
d3d12::UAVBarrierAS(cmd_list, as_build_data.out_tlas, frame_idx);
}

if (n_render_system.m_render_window.has_value())
{

d3d12::BindRaytracingPipeline(cmd_list, data.out_state_object, d3d12::GetRaytracingType(device) == RaytracingType::FALLBACK);
@@ -334,6 +331,7 @@ namespace wr
//#ifdef _DEBUG
CreateShaderTables(device, data, frame_idx);
//#endif

d3d12::DispatchRays(cmd_list,
data.out_hitgroup_shader_table[frame_idx],
data.out_miss_shader_table[frame_idx],
6 changes: 3 additions & 3 deletions src/render_tasks/d3d12_rt_hybrid_helpers.hpp
Original file line number Diff line number Diff line change
@@ -40,9 +40,9 @@ namespace wr
d3d12::AccelerationStructure out_tlas = {};

// Shader tables
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_raygen_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_miss_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_hitgroup_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_raygen_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_miss_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> out_hitgroup_shader_table = { };


// Pipeline objects
1 change: 0 additions & 1 deletion src/render_tasks/d3d12_rt_reflection_task.hpp
Original file line number Diff line number Diff line change
@@ -112,7 +112,6 @@ namespace wr
d3d12::UAVBarrierAS(cmd_list, as_build_data.out_tlas, frame_idx);
}

if (n_render_system.m_render_window.has_value())
{
d3d12::BindRaytracingPipeline(cmd_list, data.base_data.out_state_object, d3d12::GetRaytracingType(device) == RaytracingType::FALLBACK);

1 change: 0 additions & 1 deletion src/render_tasks/d3d12_rt_shadow_task.hpp
Original file line number Diff line number Diff line change
@@ -127,7 +127,6 @@ namespace wr
d3d12::UAVBarrierAS(cmd_list, as_build_data.out_tlas, frame_idx);
}

if (n_render_system.m_render_window.has_value())
{
d3d12::BindRaytracingPipeline(cmd_list, data.base_data.out_state_object, d3d12::GetRaytracingType(device) == RaytracingType::FALLBACK);

13 changes: 5 additions & 8 deletions src/render_tasks/d3d12_rtao_task.hpp
Original file line number Diff line number Diff line change
@@ -50,9 +50,9 @@ namespace wr
d3d12::AccelerationStructure out_tlas = {};

// Shader tables
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> in_raygen_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> in_miss_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> in_hitgroup_shader_table = { nullptr, nullptr, nullptr };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> in_raygen_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> in_miss_shader_table = { };
std::array<d3d12::ShaderTable*, d3d12::settings::num_back_buffers> in_hitgroup_shader_table = { };

// Pipeline objects
d3d12::StateObject* in_state_object;
@@ -66,7 +66,6 @@ namespace wr
DescriptorAllocation in_depthbuffer;

bool tlas_requires_init = false;

};

namespace internal
@@ -165,9 +164,8 @@ namespace wr
data.in_root_signature = static_cast<d3d12::RootSignature*>(rs_registry.Find(root_signatures::rt_ao_global));

// Create Shader Tables
CreateShaderTables(device, data, 0);
CreateShaderTables(device, data, 1);
CreateShaderTables(device, data, 2);
for (int i = 0; i < d3d12::settings::num_back_buffers; ++i)
CreateShaderTables(device, data, i);
}
}

@@ -186,7 +184,6 @@ namespace wr
fg.WaitForPredecessorTask<CubemapConvolutionTaskData>();
float scalar = 1.0f;

if (n_render_system.m_render_window.has_value())
{

d3d12::BindRaytracingPipeline(cmd_list, data.in_state_object, false);
1 change: 0 additions & 1 deletion src/render_tasks/d3d12_shadow_denoiser_task.hpp
Original file line number Diff line number Diff line change
@@ -571,7 +571,6 @@ namespace wr
data.m_constant_buffer_pool->Update(data.m_denoiser_settings_buffer[i], sizeof(temp::ShadowDenoiserSettings_CBData), 0, n_render_system.GetFrameIdx(), (uint8_t*)& data.m_denoiser_settings);
}

if (n_render_system.m_render_window.has_value())
{
const auto viewport = n_render_system.m_viewport;
const auto frame_idx = n_render_system.GetFrameIdx();
108 changes: 94 additions & 14 deletions src/window.cpp
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ namespace wr
{


Window::Window(HINSTANCE instance, int show_cmd, std::string const & name, std::uint32_t width, std::uint32_t height)
Window::Window(HINSTANCE instance, std::string const &name, std::uint32_t width, std::uint32_t height, bool show)
: m_title(name), m_instance(instance)
{
WNDCLASSEX wc;
@@ -85,26 +85,53 @@ namespace wr

SetWindowLongPtr(m_handle, GWLP_USERDATA, (LONG_PTR)this);

ShowWindow(m_handle, show_cmd);
ShowWindow(m_handle, show ? SW_SHOWNORMAL : SW_HIDE);
UpdateWindow(m_handle);

m_running = true;
}

Window::Window(HINSTANCE instance, std::string const& name, std::uint32_t width, std::uint32_t height, bool show)
: Window(instance, show ? SW_SHOWNORMAL : SW_HIDE, name, width, height)
{

Window::Window( std::string const &name, std::uint32_t width, std::uint32_t height)
: m_title(name), m_window_width(width), m_window_height(height) {

}

Window::~Window()
{
Stop();
UnregisterClassA(m_title.c_str(), m_instance);

if (m_instance)
{
UnregisterClassA(m_title.c_str(), m_instance);
}
}

void Window::PollEvents()
{
//Handle virtual window

if(!m_handle)
{
if (m_render_func)
{
float dt = std::chrono::duration<float>(std::chrono::high_resolution_clock::now() - m_prev_time).count();

if (!m_has_time_point) {
dt = 0;
m_has_time_point = true;

if (m_resize_callback) {
m_resize_callback(m_window_width, m_window_height);
}
}

m_prev_time = std::chrono::high_resolution_clock::now();
m_render_func(dt);
}

return;
}

//Handle physical window

MSG msg;
if (PeekMessage(&msg, m_handle, 0, 0, PM_REMOVE))
{
@@ -118,15 +145,25 @@ namespace wr

void Window::Show()
{
ShowWindow(m_handle, SW_SHOW);
if(m_handle)
{
ShowWindow(m_handle, SW_SHOW);
}
else
{
LOGW("Window::show called on virtual window");
}
}

void Window::Stop()
{
DestroyWindow(m_handle);
if (m_handle)
{
DestroyWindow(m_handle);
}
}

void Window::SetRenderLoop(std::function<void()> render_func)
void Window::SetRenderLoop(std::function<void (float dt)> render_func)
{
m_render_func = std::move(render_func);
}
@@ -138,22 +175,38 @@ namespace wr
PollEvents();
}

UnregisterClassA(m_title.c_str(), m_instance);
if(m_instance)
{
UnregisterClassA(m_title.c_str(), m_instance);
}
}

void Window::SetKeyCallback(KeyCallback callback)
{
m_key_callback = std::move(callback);

if(!m_handle)
{
LOGW("Window::SetKeyCallback called on virtual window");
}
}

void Window::SetMouseCallback(MouseCallback callback)
{
m_mouse_callback = std::move(callback);

if (!m_handle) {
LOGW("Window::SetMouseCallback called on virtual window");
}
}

void Window::SetMouseWheelCallback(MouseWheelCallback callback)
{
m_mouse_wheel_callback = std::move(callback);

if (!m_handle) {
LOGW("Window::SetMouseWheelCallback called on virtual window");
}
}

void Window::SetResizeCallback(ResizeCallback callback)
@@ -168,13 +221,22 @@ namespace wr

std::int32_t Window::GetWidth() const
{
if (!m_handle)
{
return m_window_width;
}

RECT r;
GetClientRect(m_handle, &r);
return static_cast<std::int32_t>(r.right - r.left);
}

std::int32_t Window::GetHeight() const
{
if (!m_handle) {
return m_window_height;
}

RECT r;
GetClientRect(m_handle, &r);
return static_cast<std::int32_t>(r.bottom - r.top);
@@ -190,8 +252,18 @@ namespace wr
return m_handle;
}

bool Window::HasPhysicalWindow() const
{
return m_handle;
}

bool Window::IsFullscreen() const
{
if(!m_handle)
{
return true;
}

RECT a, b;
GetWindowRect(m_handle, &a);
GetWindowRect(GetDesktopWindow(), &b);
@@ -220,7 +292,15 @@ namespace wr
case WM_PAINT:
if (m_render_func)
{
m_render_func();
float dt = std::chrono::duration<float>(std::chrono::high_resolution_clock::now() - m_prev_time).count();

if (!m_has_time_point) {
dt = 0;
m_has_time_point = true;
}

m_prev_time = std::chrono::high_resolution_clock::now();
m_render_func(dt);
}
return 0;
case WM_DESTROY:
28 changes: 22 additions & 6 deletions src/window.hpp
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@

#include <Windows.h>
#include <functional>
#include <chrono>

namespace wr
{
@@ -28,15 +29,25 @@ namespace wr
using ResizeCallback = std::function<void(std::uint32_t width, std::uint32_t height)>;
using MouseWheelCallback = std::function<void(int key, int action, int mods)>;
public:

/*!
Creates a physical window
* @param instance A handle to the current instance of the application.
* @param name Window title.
* @param width Initial window width.
* @param height Initial window height.
* @param show Controls whether the window will be shown. Default is true.
*/
Window(HINSTANCE instance, std::string const& name, std::uint32_t width, std::uint32_t height, bool show = true);
Window(HINSTANCE instance, int show_cmd, std::string const& name, std::uint32_t width, std::uint32_t height);

/*!
Creates a non-physical window
* @param name Window title.
* @param width Initial window width.
* @param height Initial window height.
*/
Window(std::string const &name, std::uint32_t width, std::uint32_t height);

~Window();

Window(const Window&) = delete;
@@ -52,7 +63,7 @@ namespace wr
void Stop();

/*! Give the window a function to call on repaint */
void SetRenderLoop(std::function<void()> render_func);
void SetRenderLoop(std::function<void (float dt)> render_func);
/*! Start a loop that runs until the window is closed. */
void StartRenderLoop();

@@ -77,6 +88,8 @@ namespace wr
HWND GetWindowHandle() const;
/*! Checks whether the window is fullscreen */
bool IsFullscreen() const;
/*! Checks whether the window is OS backed or not */
bool HasPhysicalWindow() const;

private:
/*! WindowProc that calls `WindowProc_Impl` */
@@ -89,16 +102,19 @@ namespace wr
ResizeCallback m_resize_callback;
MouseWheelCallback m_mouse_wheel_callback;

std::function<void()> m_render_func;
std::function<void (float dt)> m_render_func;

std::string m_title;

bool m_running;
HWND m_handle;
HINSTANCE m_instance;
bool m_running = true;
HWND m_handle = nullptr;
HINSTANCE m_instance = nullptr;

std::int32_t m_window_width = 0;
std::int32_t m_window_height = 0;

decltype(std::chrono::high_resolution_clock::now()) m_prev_time;
bool m_has_time_point = false;
};

} /* wr */
2 changes: 1 addition & 1 deletion tests/common/scene.hpp
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ class Scene
virtual ~Scene();

virtual void Init(wr::D3D12RenderSystem* rs, unsigned int width, unsigned int height, void* extra = nullptr);
virtual void Update(float delta = 0) = 0;
virtual void Update(float delta_time) = 0;
std::shared_ptr<wr::SceneGraph> GetSceneGraph();
template<typename T>
std::shared_ptr<T> GetCamera();
13 changes: 6 additions & 7 deletions tests/demo/demo.cpp
Original file line number Diff line number Diff line change
@@ -130,6 +130,7 @@ int WispEntry()
wr::ModelLoader* assimp_model_loader = new wr::AssimpModelLoader();
wr::ModelLoader* gltf_model_loader = new wr::TinyGLTFModelLoader();

TRY_M(CoInitialize(nullptr), "Couldn't CoInitialize");
render_system->Init(window.get());

phys_engine.CreatePhysicsWorld();
@@ -151,12 +152,10 @@ int WispEntry()
auto file_watcher = new util::FileWatcher("resources/shaders", std::chrono::milliseconds(100));
file_watcher->StartAsync(&ShaderDirChangeDetected);

window->SetRenderLoop([&]() {
// Find delta
float delta = ImGui::GetIO().DeltaTime;
bool capture_frame = engine::recorder.ShouldCaptureAndIncrement(delta);
if (capture_frame)
{
window->SetRenderLoop([&](float dt) {

bool capture_frame = engine::recorder.ShouldCaptureAndIncrement(dt);
if (capture_frame) {
fg_manager::Get()->SaveTaskToDisc<wr::PostProcessingData>(engine::recorder.GetNextFilename(".tga"), 0);
}

@@ -170,7 +169,7 @@ int WispEntry()
fg_manager::Get()->SetShouldExecute<wr::CubemapConvolutionTaskData>(true);
}

current_scene->Update(delta);
current_scene->Update(dt);

#ifdef ENABLE_PHYSICS
phys_engine.UpdateSim(delta, *current_scene->GetSceneGraph());
4 changes: 2 additions & 2 deletions tests/demo/scene_emibl.cpp
Original file line number Diff line number Diff line change
@@ -321,7 +321,7 @@ void EmiblScene::BuildScene(unsigned int width, unsigned int height, void* extra
dir_light->SetDirectional({ 360_deg - 136_deg, 0, 0 }, { 4, 4, 4 });
}

void EmiblScene::Update(float delta)
void EmiblScene::Update(float dt)
{
m_camera->Update(delta);
m_camera->Update(dt);
}
2 changes: 1 addition & 1 deletion tests/demo/scene_emibl.hpp
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ class EmiblScene : public Scene
EmiblScene();
~EmiblScene();

void Update(float delta = 0) final;
void Update(float delta_time) final;

protected:
void LoadResources() final;
6 changes: 3 additions & 3 deletions tests/demo/scene_sponza.cpp
Original file line number Diff line number Diff line change
@@ -136,8 +136,8 @@ void SponzaScene::BuildScene(unsigned int width, unsigned int height, void* extr
LoadLightsFromJSON();
}

void SponzaScene::Update(float delta)
void SponzaScene::Update(float dt)
{
m_camera->Update(delta);
m_camera_spline_node->UpdateSplineNode(delta, m_camera);
m_camera->Update(dt);
m_camera_spline_node->UpdateSplineNode(dt, m_camera);
}
2 changes: 1 addition & 1 deletion tests/demo/scene_sponza.hpp
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ class SponzaScene : public Scene
SponzaScene();
~SponzaScene();

void Update(float delta = 0) final;
void Update(float delta_time) final;

protected:
void LoadResources() final;
6 changes: 3 additions & 3 deletions tests/demo/scene_viknell.cpp
Original file line number Diff line number Diff line change
@@ -140,8 +140,8 @@ void ViknellScene::BuildScene(unsigned int width, unsigned int height, void* ext
LoadLightsFromJSON();
}

void ViknellScene::Update(float delta)
void ViknellScene::Update(float dt)
{
m_camera->Update(delta);
m_camera_spline_node->UpdateSplineNode(ImGui::GetIO().DeltaTime, m_camera);
m_camera->Update(dt);
m_camera_spline_node->UpdateSplineNode(dt, m_camera);
}
2 changes: 1 addition & 1 deletion tests/demo/scene_viknell.hpp
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ class ViknellScene : public Scene
ViknellScene();
~ViknellScene();

void Update(float delta = 0) final;
void Update(float delta_time) final;

protected:
void LoadResources() final;
2 changes: 1 addition & 1 deletion tests/graphics_benchmark/spheres_scene.cpp
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ void SpheresScene::BuildScene(unsigned int width, unsigned int height)
dir_light->SetDirectional({ 136._deg, 0, 0 }, { 4, 4, 4 });
}

void SpheresScene::Update()
void SpheresScene::Update(float dt)
{

}
2 changes: 1 addition & 1 deletion tests/graphics_benchmark/spheres_scene.hpp
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ class SpheresScene : public Scene
public:
SpheresScene();

void Update() final;
void Update(float dt) final;

protected:
void LoadResources() final;