-
Notifications
You must be signed in to change notification settings - Fork 65
Description
We have this piece of code which is not elegant / resillient
Nabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1459 in bed64ec
SViewport const viewport |
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
float const frameBufferWidth = drawData->DisplaySize.x * drawData->FramebufferScale.x; |
and this seems only knowable from ImGUI::GetDrawData
Nabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1161 in bed64ec
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)
Nabla/src/nbl/ext/ImGui/ImGui.cpp
Line 1496 in bed64ec
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&)>