Fixed full-size viewport and scissor for UI
This commit is contained in:
parent
8a61105ec6
commit
350e3d03a3
1 changed files with 6 additions and 0 deletions
|
|
@ -615,6 +615,12 @@ void VulkanExampleBase::updateOverlay()
|
||||||
void VulkanExampleBase::drawUI(const VkCommandBuffer commandBuffer)
|
void VulkanExampleBase::drawUI(const VkCommandBuffer commandBuffer)
|
||||||
{
|
{
|
||||||
if (settings.overlay) {
|
if (settings.overlay) {
|
||||||
|
|
||||||
|
const VkViewport viewport = vks::initializers::viewport((float)width, (float)height, 0.0f, 1.0f);
|
||||||
|
const VkRect2D scissor = vks::initializers::rect2D(width, height, 0, 0);
|
||||||
|
vkCmdSetViewport(commandBuffer, 0, 1, &viewport);
|
||||||
|
vkCmdSetScissor(commandBuffer, 0, 1, &scissor);
|
||||||
|
|
||||||
UIOverlay->draw(commandBuffer);
|
UIOverlay->draw(commandBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue