@@ -148,30 +148,20 @@ All this is configured using the `VkPipelineRasterizationStateCreateInfo` struct
148148
149149[,c++]
150150----
151- vk::PipelineRasterizationStateCreateInfo rasterizer({}, vk::False);
151+ vk::PipelineRasterizationStateCreateInfo rasterizer{ .depthClampEnable = vk::False, .rasterizerDiscardEnable = vk::False,
152+ .polygonMode = vk::PolygonMode::eFill, .cullMode = vk::CullModeFlagBits::eBack,
153+ .frontFace = vk::FrontFace::eClockwise, .depthBiasEnable = vk::False,
154+ .depthBiasSlopeFactor = 1.0f, .lineWidth = 1.0f };
152155----
153156
154157If `depthClampEnable` is set to `VK_TRUE`, then fragments that are beyond
155158the near and far planes are clamped to them as opposed to discarding them.
156159This is useful in some special cases like shadow maps.
157- Using this requires enabling a GPU feature.
158-
159- [,c++]
160- ----
161- vk::PipelineRasterizationStateCreateInfo rasterizer({}, vk::False, vk::False);
162- ----
160+ Using this requires enabling a GPU feature.
163161
164162If `rasterizerDiscardEnable` is set to `VK_TRUE`, then geometry never passes through the rasterizer stage.
165163This basically disables any output to the framebuffer.
166164
167- [,c++]
168- ----
169- vk::PipelineRasterizationStateCreateInfo rasterizer{ .depthClampEnable = vk::False, .rasterizerDiscardEnable = vk::False,
170- .polygonMode = vk::PolygonMode::eFill, .cullMode = vk::CullModeFlagBits::eBack,
171- .frontFace = vk::FrontFace::eClockwise, .depthBiasEnable = vk::False,
172- .depthBiasSlopeFactor = 1.0f, .lineWidth = 1.0f };
173- ----
174-
175165The `polygonMode` determines how fragments are generated for geometry.
176166The following modes are available:
177167
0 commit comments