Viewport controls

This commit is contained in:
Dynamitos
2022-11-17 16:47:42 +01:00
parent f635ee2100
commit 4ba0bf3b45
73 changed files with 627 additions and 449 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
target_sources(Engine
PUBLIC
PRIVATE
NsightAftermathGpuCrashTracker.h
NsightAftermathGpuCrashTracker.cpp
NsightAftermathHelpers.h
@@ -283,7 +283,7 @@ PGraphicsPipeline PipelineCache::createPipeline(const GraphicsPipelineCreateInfo
blendAttachment.alphaBlendOp = (VkBlendOp)attachment.alphaBlendOp;
blendAttachment.blendEnable = attachment.blendEnable;
blendAttachment.colorBlendOp = (VkBlendOp)attachment.colorBlendOp;
blendAttachment.colorWriteMask = colorAttachments[i]->componentFlags;
blendAttachment.colorWriteMask = attachment.colorWriteMask;
blendAttachment.dstAlphaBlendFactor = (VkBlendFactor)attachment.dstAlphaBlendFactor;
blendAttachment.srcAlphaBlendFactor = (VkBlendFactor)attachment.srcAlphaBlendFactor;
blendAttachment.dstColorBlendFactor = (VkBlendFactor)attachment.dstColorBlendFactor;
@@ -355,10 +355,10 @@ void Window::choosePresentMode(const Array<VkPresentModeKHR> &modes)
Viewport::Viewport(PGraphics graphics, PWindow owner, const ViewportCreateInfo &viewportInfo)
: Gfx::Viewport(owner, viewportInfo), graphics(graphics)
{
handle.width = static_cast<float>(viewportInfo.sizeX);
handle.height = static_cast<float>(viewportInfo.sizeY);
handle.x = static_cast<float>(viewportInfo.offsetX);
handle.y = static_cast<float>(viewportInfo.offsetY) + handle.height;
handle.width = static_cast<float>(viewportInfo.dimensions.size.x);
handle.height = static_cast<float>(viewportInfo.dimensions.size.y);
handle.x = static_cast<float>(viewportInfo.dimensions.offset.x);
handle.y = static_cast<float>(viewportInfo.dimensions.offset.y) + handle.height;
handle.height = -handle.height;
handle.minDepth = 0.f;
handle.maxDepth = 1.f;