Skip to content

Commit

Permalink
remove unused deltaTimeInSec, use UI creation parameters to get resou…
Browse files Browse the repository at this point in the history
…rce info count for ds pool info purposes
  • Loading branch information
AnastaZIuk committed Sep 23, 2024
1 parent f3d8ded commit 64071ae
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions 61_UI/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ class UISampleApp final : public examples::SimpleWindowedApplication

// note that we use default layout provided by our extension, but you are free to create your own by filling nbl::ext::imgui::UI::S_CREATION_PARAMETERS::resources
const auto* descriptorSetLayout = pass.ui.manager->getPipeline()->getLayout()->getDescriptorSetLayout(0u);
const auto& params = pass.ui.manager->getCreationParameters();

IDescriptorPool::SCreateInfo descriptorPoolInfo = {};
descriptorPoolInfo.maxDescriptorCount[static_cast<uint32_t>(asset::IDescriptor::E_TYPE::ET_SAMPLER)] = 69u;
descriptorPoolInfo.maxDescriptorCount[static_cast<uint32_t>(asset::IDescriptor::E_TYPE::ET_SAMPLED_IMAGE)] = 69u;
descriptorPoolInfo.maxDescriptorCount[static_cast<uint32_t>(asset::IDescriptor::E_TYPE::ET_SAMPLER)] = params.resources.count;
descriptorPoolInfo.maxDescriptorCount[static_cast<uint32_t>(asset::IDescriptor::E_TYPE::ET_SAMPLED_IMAGE)] = params.resources.count;
descriptorPoolInfo.maxSets = 1u;
descriptorPoolInfo.flags = IDescriptorPool::E_CREATE_FLAGS::ECF_UPDATE_AFTER_BIND_BIT;

Expand Down Expand Up @@ -665,9 +666,6 @@ class UISampleApp final : public examples::SimpleWindowedApplication

static std::chrono::microseconds previousEventTimestamp{};

// TODO: Use real deltaTime instead
static float deltaTimeInSec = 0.1f;

m_inputSystem->getDefaultMouse(&mouse);
m_inputSystem->getDefaultKeyboard(&keyboard);

Expand Down

0 comments on commit 64071ae

Please sign in to comment.