We have this piece of code which is not elegant / resillient
However for the user to be able to set this sanely, one must know the framebuffer Width and Height
|
float const frameBufferWidth = drawData->DisplaySize.x * drawData->FramebufferScale.x; |
and this seems only knowable from ImGUI::GetDrawData
|
auto const* drawData = ImGui::GetDrawData(); |
Which probably needs a call to ImGUI::Render 🤦
P.S. also while you're at it, make the push constant setting an overridable lambda (so people can pump the data to the drawcall differently)
|
commandBuffer->pushConstants(m_pipeline->getLayout(), IShader::E_SHADER_STAGE::ESS_VERTEX | IShader::E_SHADER_STAGE::ESS_FRAGMENT, 0u, sizeof(constants), &constants); |
std::function<void(IGPUCommandBuffer*,const PushConstants&)>
We have this piece of code which is not elegant / resillient
Nabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1459 in bed64ec
However for the user to be able to set this sanely, one must know the framebuffer Width and Height
Nabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1167 in bed64ec
and this seems only knowable from
ImGUI::GetDrawDataNabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1161 in bed64ec
Which probably needs a call to
ImGUI::Render🤦P.S. also while you're at it, make the push constant setting an overridable lambda (so people can pump the data to the drawcall differently)
Nabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1496 in bed64ec