File tree Expand file tree Collapse file tree 7 files changed +6
-19
lines changed Expand file tree Collapse file tree 7 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -915,9 +915,6 @@ class HelloTriangleApplication {
915
915
916
916
return attributeDescriptions;
917
917
}
918
- bool operator ==(const Vertex& other) const {
919
- return pos == other.pos && color == other.color && texCoord == other.texCoord ;
920
- }
921
918
};
922
919
// ///////////////////////////////////////////////////////////////
923
920
Original file line number Diff line number Diff line change @@ -97,9 +97,6 @@ index a209945..6dabfb1 100644
97
97
- inline static const std::vector<uint16_t> indices = {
98
98
- 0, 1, 2, 2, 3, 0,
99
99
- 4, 5, 6, 6, 7, 4
100
- + bool operator==(const Vertex& other) const {
101
- + return pos == other.pos && color == other.color && texCoord == other.texCoord;
102
- + }
103
100
};
104
101
/////////////////////////////////////////////////////////////////
105
102
Original file line number Diff line number Diff line change @@ -921,9 +921,6 @@ class HelloTriangleApplication {
921
921
922
922
return attributeDescriptions;
923
923
}
924
- bool operator ==(const Vertex& other) const {
925
- return pos == other.pos && color == other.color && texCoord == other.texCoord ;
926
- }
927
924
};
928
925
// ///////////////////////////////////////////////////////////////
929
926
Original file line number Diff line number Diff line change @@ -544,7 +544,7 @@ class HelloTriangleApplication {
544
544
vk::AttachmentDescription colorAttachmentResolve;
545
545
colorAttachmentResolve.format = m_swapChainImageFormat;
546
546
colorAttachmentResolve.samples = vk::SampleCountFlagBits::e1 ;
547
- colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eClear ;
547
+ colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eDontCare ;
548
548
colorAttachmentResolve.storeOp = vk::AttachmentStoreOp::eStore;
549
549
colorAttachmentResolve.stencilLoadOp = vk::AttachmentLoadOp::eDontCare;
550
550
colorAttachmentResolve.stencilStoreOp = vk::AttachmentStoreOp::eDontCare;
@@ -953,9 +953,6 @@ class HelloTriangleApplication {
953
953
954
954
return attributeDescriptions;
955
955
}
956
- bool operator ==(const Vertex& other) const {
957
- return pos == other.pos && color == other.color && texCoord == other.texCoord ;
958
- }
959
956
};
960
957
// ///////////////////////////////////////////////////////////////
961
958
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ index 89a0f11..ad5d479 100644
62
62
+ vk::AttachmentDescription colorAttachmentResolve;
63
63
+ colorAttachmentResolve.format = m_swapChainImageFormat;
64
64
+ colorAttachmentResolve.samples = vk::SampleCountFlagBits::e1;
65
- + colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eClear ;
65
+ + colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eDontCare ;
66
66
+ colorAttachmentResolve.storeOp = vk::AttachmentStoreOp::eStore;
67
67
+ colorAttachmentResolve.stencilLoadOp = vk::AttachmentLoadOp::eDontCare;
68
68
+ colorAttachmentResolve.stencilStoreOp = vk::AttachmentStoreOp::eDontCare;
Original file line number Diff line number Diff line change @@ -274,14 +274,16 @@ void recreateSwapChain() {
274
274
vk::AttachmentDescription colorAttachmentResolve;
275
275
colorAttachmentResolve.format = m_swapChainImageFormat;
276
276
colorAttachmentResolve.samples = vk::SampleCountFlagBits::e1;
277
- colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eClear ;
277
+ colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eDontCare ;
278
278
colorAttachmentResolve.storeOp = vk::AttachmentStoreOp::eStore;
279
279
colorAttachmentResolve.stencilLoadOp = vk::AttachmentLoadOp::eDontCare;
280
280
colorAttachmentResolve.stencilStoreOp = vk::AttachmentStoreOp::eDontCare;
281
281
colorAttachmentResolve.initialLayout = vk::ImageLayout::eUndefined;
282
282
colorAttachmentResolve.finalLayout = vk::ImageLayout::ePresentSrcKHR;
283
283
```
284
284
285
+ 注意 ` loadOp ` 不再需要清除,整幅图像会根据多重缓冲图像更新全部内容。
286
+
285
287
现在必须指示渲染通道将多重采样颜色图像解析为常规附件。
286
288
创建一个新的附件引用,它将指向将用作解析目标的颜色缓冲
287
289
Original file line number Diff line number Diff line change @@ -544,7 +544,7 @@ class HelloTriangleApplication {
544
544
vk::AttachmentDescription colorAttachmentResolve;
545
545
colorAttachmentResolve.format = m_swapChainImageFormat;
546
546
colorAttachmentResolve.samples = vk::SampleCountFlagBits::e1 ;
547
- colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eClear ;
547
+ colorAttachmentResolve.loadOp = vk::AttachmentLoadOp::eDontCare ;
548
548
colorAttachmentResolve.storeOp = vk::AttachmentStoreOp::eStore;
549
549
colorAttachmentResolve.stencilLoadOp = vk::AttachmentLoadOp::eDontCare;
550
550
colorAttachmentResolve.stencilStoreOp = vk::AttachmentStoreOp::eDontCare;
@@ -953,9 +953,6 @@ class HelloTriangleApplication {
953
953
954
954
return attributeDescriptions;
955
955
}
956
- bool operator ==(const Vertex& other) const {
957
- return pos == other.pos && color == other.color && texCoord == other.texCoord ;
958
- }
959
956
};
960
957
// ///////////////////////////////////////////////////////////////
961
958
You can’t perform that action at this time.
0 commit comments