Skip to content

Commit 903e962

Browse files
Removed unnecessary declarations of rasterizer. They just disturbed the meaning and didn't compile anyway.
1 parent 3fdc366 commit 903e962

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

en/03_Drawing_a_triangle/02_Graphics_pipeline_basics/02_Fixed_functions.adoc

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

154157
If `depthClampEnable` is set to `VK_TRUE`, then fragments that are beyond
155158
the near and far planes are clamped to them as opposed to discarding them.
156159
This 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

164162
If `rasterizerDiscardEnable` is set to `VK_TRUE`, then geometry never passes through the rasterizer stage.
165163
This 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-
175165
The `polygonMode` determines how fragments are generated for geometry.
176166
The following modes are available:
177167

0 commit comments

Comments
 (0)