Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a62831

Browse files
author
sjfricke
committed
Removed white spaces
There was 600 bytes worth white spaces I removed to help more in the future from propegating
1 parent 02d2ee2 commit 3a62831

23 files changed

Lines changed: 110 additions & 110 deletions

code/base_code.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HelloTriangleApplication {
2929
}
3030

3131
void initVulkan() {
32-
32+
3333
}
3434

3535
void mainLoop() {
@@ -56,4 +56,4 @@ int main() {
5656
}
5757

5858
return EXIT_SUCCESS;
59-
}
59+
}

code/command_buffers.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ class HelloTriangleApplication {
7878

7979
VkQueue graphicsQueue;
8080
VkQueue presentQueue;
81-
81+
8282
VkSwapchainKHR swapChain;
8383
std::vector<VkImage> swapChainImages;
8484
VkFormat swapChainImageFormat;
8585
VkExtent2D swapChainExtent;
8686
std::vector<VkImageView> swapChainImageViews;
8787
std::vector<VkFramebuffer> swapChainFramebuffers;
88-
88+
8989
VkRenderPass renderPass;
9090
VkPipelineLayout pipelineLayout;
9191
VkPipeline graphicsPipeline;
92-
92+
9393
VkCommandPool commandPool;
9494
std::vector<VkCommandBuffer> commandBuffers;
9595

@@ -462,7 +462,7 @@ class HelloTriangleApplication {
462462
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
463463
pipelineLayoutInfo.setLayoutCount = 0;
464464
pipelineLayoutInfo.pushConstantRangeCount = 0;
465-
465+
466466
if (vkCreatePipelineLayout(device, &pipelineLayoutInfo, nullptr, &pipelineLayout) != VK_SUCCESS) {
467467
throw std::runtime_error("failed to create pipeline layout!");
468468
}
@@ -519,7 +519,7 @@ class HelloTriangleApplication {
519519
VkCommandPoolCreateInfo poolInfo = {};
520520
poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
521521
poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily;
522-
522+
523523
if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
524524
throw std::runtime_error("failed to create command pool!");
525525
}

code/depth_buffering.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,19 @@ class HelloTriangleApplication {
147147

148148
VkQueue graphicsQueue;
149149
VkQueue presentQueue;
150-
150+
151151
VkSwapchainKHR swapChain;
152152
std::vector<VkImage> swapChainImages;
153153
VkFormat swapChainImageFormat;
154154
VkExtent2D swapChainExtent;
155155
std::vector<VkImageView> swapChainImageViews;
156156
std::vector<VkFramebuffer> swapChainFramebuffers;
157-
157+
158158
VkRenderPass renderPass;
159159
VkDescriptorSetLayout descriptorSetLayout;
160160
VkPipelineLayout pipelineLayout;
161161
VkPipeline graphicsPipeline;
162-
162+
163163
VkCommandPool commandPool;
164164

165165
VkImage depthImage;
@@ -170,7 +170,7 @@ class HelloTriangleApplication {
170170
VkDeviceMemory textureImageMemory;
171171
VkImageView textureImageView;
172172
VkSampler textureSampler;
173-
173+
174174
VkBuffer vertexBuffer;
175175
VkDeviceMemory vertexBufferMemory;
176176
VkBuffer indexBuffer;
@@ -302,7 +302,7 @@ class HelloTriangleApplication {
302302

303303
void recreateSwapChain() {
304304
vkDeviceWaitIdle(device);
305-
305+
306306
cleanupSwapChain();
307307

308308
createSwapChain();
@@ -670,7 +670,7 @@ class HelloTriangleApplication {
670670
colorBlending.blendConstants[1] = 0.0f;
671671
colorBlending.blendConstants[2] = 0.0f;
672672
colorBlending.blendConstants[3] = 0.0f;
673-
673+
674674
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {};
675675
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
676676
pipelineLayoutInfo.setLayoutCount = 1;

code/descriptor_layout.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,21 @@ class HelloTriangleApplication {
131131

132132
VkQueue graphicsQueue;
133133
VkQueue presentQueue;
134-
134+
135135
VkSwapchainKHR swapChain;
136136
std::vector<VkImage> swapChainImages;
137137
VkFormat swapChainImageFormat;
138138
VkExtent2D swapChainExtent;
139139
std::vector<VkImageView> swapChainImageViews;
140140
std::vector<VkFramebuffer> swapChainFramebuffers;
141-
141+
142142
VkRenderPass renderPass;
143143
VkDescriptorSetLayout descriptorSetLayout;
144144
VkPipelineLayout pipelineLayout;
145145
VkPipeline graphicsPipeline;
146-
146+
147147
VkCommandPool commandPool;
148-
148+
149149
VkBuffer vertexBuffer;
150150
VkDeviceMemory vertexBufferMemory;
151151
VkBuffer indexBuffer;
@@ -249,14 +249,14 @@ class HelloTriangleApplication {
249249

250250
static void onWindowResized(GLFWwindow* window, int width, int height) {
251251
if (width == 0 || height == 0) return;
252-
252+
253253
HelloTriangleApplication* app = reinterpret_cast<HelloTriangleApplication*>(glfwGetWindowUserPointer(window));
254254
app->recreateSwapChain();
255255
}
256256

257257
void recreateSwapChain() {
258258
vkDeviceWaitIdle(device);
259-
259+
260260
cleanupSwapChain();
261261

262262
createSwapChain();
@@ -607,7 +607,7 @@ class HelloTriangleApplication {
607607
colorBlending.blendConstants[1] = 0.0f;
608608
colorBlending.blendConstants[2] = 0.0f;
609609
colorBlending.blendConstants[3] = 0.0f;
610-
610+
611611
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {};
612612
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
613613
pipelineLayoutInfo.setLayoutCount = 1;

code/descriptor_set.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,21 @@ class HelloTriangleApplication {
131131

132132
VkQueue graphicsQueue;
133133
VkQueue presentQueue;
134-
134+
135135
VkSwapchainKHR swapChain;
136136
std::vector<VkImage> swapChainImages;
137137
VkFormat swapChainImageFormat;
138138
VkExtent2D swapChainExtent;
139139
std::vector<VkImageView> swapChainImageViews;
140140
std::vector<VkFramebuffer> swapChainFramebuffers;
141-
141+
142142
VkRenderPass renderPass;
143143
VkDescriptorSetLayout descriptorSetLayout;
144144
VkPipelineLayout pipelineLayout;
145145
VkPipeline graphicsPipeline;
146-
146+
147147
VkCommandPool commandPool;
148-
148+
149149
VkBuffer vertexBuffer;
150150
VkDeviceMemory vertexBufferMemory;
151151
VkBuffer indexBuffer;
@@ -256,14 +256,14 @@ class HelloTriangleApplication {
256256

257257
static void onWindowResized(GLFWwindow* window, int width, int height) {
258258
if (width == 0 || height == 0) return;
259-
259+
260260
HelloTriangleApplication* app = reinterpret_cast<HelloTriangleApplication*>(glfwGetWindowUserPointer(window));
261261
app->recreateSwapChain();
262262
}
263263

264264
void recreateSwapChain() {
265265
vkDeviceWaitIdle(device);
266-
266+
267267
cleanupSwapChain();
268268

269269
createSwapChain();
@@ -614,7 +614,7 @@ class HelloTriangleApplication {
614614
colorBlending.blendConstants[1] = 0.0f;
615615
colorBlending.blendConstants[2] = 0.0f;
616616
colorBlending.blendConstants[3] = 0.0f;
617-
617+
618618
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {};
619619
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
620620
pipelineLayoutInfo.setLayoutCount = 1;

code/fixed_functions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ class HelloTriangleApplication {
7878

7979
VkQueue graphicsQueue;
8080
VkQueue presentQueue;
81-
81+
8282
VkSwapchainKHR swapChain;
8383
std::vector<VkImage> swapChainImages;
8484
VkFormat swapChainImageFormat;
8585
VkExtent2D swapChainExtent;
8686
std::vector<VkImageView> swapChainImageViews;
87-
87+
8888
VkPipelineLayout pipelineLayout;
8989

9090
void initWindow() {
@@ -412,7 +412,7 @@ class HelloTriangleApplication {
412412
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
413413
pipelineLayoutInfo.setLayoutCount = 0;
414414
pipelineLayoutInfo.pushConstantRangeCount = 0;
415-
415+
416416
if (vkCreatePipelineLayout(device, &pipelineLayoutInfo, nullptr, &pipelineLayout) != VK_SUCCESS) {
417417
throw std::runtime_error("failed to create pipeline layout!");
418418
}

code/framebuffers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ class HelloTriangleApplication {
7878

7979
VkQueue graphicsQueue;
8080
VkQueue presentQueue;
81-
81+
8282
VkSwapchainKHR swapChain;
8383
std::vector<VkImage> swapChainImages;
8484
VkFormat swapChainImageFormat;
8585
VkExtent2D swapChainExtent;
8686
std::vector<VkImageView> swapChainImageViews;
8787
std::vector<VkFramebuffer> swapChainFramebuffers;
88-
88+
8989
VkRenderPass renderPass;
9090
VkPipelineLayout pipelineLayout;
9191
VkPipeline graphicsPipeline;
@@ -455,7 +455,7 @@ class HelloTriangleApplication {
455455
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
456456
pipelineLayoutInfo.setLayoutCount = 0;
457457
pipelineLayoutInfo.pushConstantRangeCount = 0;
458-
458+
459459
if (vkCreatePipelineLayout(device, &pipelineLayoutInfo, nullptr, &pipelineLayout) != VK_SUCCESS) {
460460
throw std::runtime_error("failed to create pipeline layout!");
461461
}

code/graphics_pipeline_complete.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ class HelloTriangleApplication {
7878

7979
VkQueue graphicsQueue;
8080
VkQueue presentQueue;
81-
81+
8282
VkSwapchainKHR swapChain;
8383
std::vector<VkImage> swapChainImages;
8484
VkFormat swapChainImageFormat;
8585
VkExtent2D swapChainExtent;
8686
std::vector<VkImageView> swapChainImageViews;
87-
87+
8888
VkRenderPass renderPass;
8989
VkPipelineLayout pipelineLayout;
9090
VkPipeline graphicsPipeline;
@@ -449,7 +449,7 @@ class HelloTriangleApplication {
449449
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
450450
pipelineLayoutInfo.setLayoutCount = 0;
451451
pipelineLayoutInfo.pushConstantRangeCount = 0;
452-
452+
453453
if (vkCreatePipelineLayout(device, &pipelineLayoutInfo, nullptr, &pipelineLayout) != VK_SUCCESS) {
454454
throw std::runtime_error("failed to create pipeline layout!");
455455
}

code/hello_triangle.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ class HelloTriangleApplication {
7878

7979
VkQueue graphicsQueue;
8080
VkQueue presentQueue;
81-
81+
8282
VkSwapchainKHR swapChain;
8383
std::vector<VkImage> swapChainImages;
8484
VkFormat swapChainImageFormat;
8585
VkExtent2D swapChainExtent;
8686
std::vector<VkImageView> swapChainImageViews;
8787
std::vector<VkFramebuffer> swapChainFramebuffers;
88-
88+
8989
VkRenderPass renderPass;
9090
VkPipelineLayout pipelineLayout;
9191
VkPipeline graphicsPipeline;
92-
92+
9393
VkCommandPool commandPool;
9494
std::vector<VkCommandBuffer> commandBuffers;
9595

@@ -589,7 +589,7 @@ class HelloTriangleApplication {
589589
}
590590
}
591591
}
592-
592+
593593
void createSemaphores() {
594594
VkSemaphoreCreateInfo semaphoreInfo = {};
595595
semaphoreInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;

code/image_views.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class HelloTriangleApplication {
7777

7878
VkQueue graphicsQueue;
7979
VkQueue presentQueue;
80-
80+
8181
VkSwapchainKHR swapChain;
8282
std::vector<VkImage> swapChainImages;
8383
VkFormat swapChainImageFormat;
@@ -288,7 +288,7 @@ class HelloTriangleApplication {
288288
if (vkCreateSwapchainKHR(device, &createInfo, nullptr, &swapChain) != VK_SUCCESS) {
289289
throw std::runtime_error("failed to create swap chain!");
290290
}
291-
291+
292292
vkGetSwapchainImagesKHR(device, swapChain, &imageCount, nullptr);
293293
swapChainImages.resize(imageCount);
294294
vkGetSwapchainImagesKHR(device, swapChain, &imageCount, swapChainImages.data());
@@ -358,7 +358,7 @@ class HelloTriangleApplication {
358358

359359
actualExtent.width = std::max(capabilities.minImageExtent.width, std::min(capabilities.maxImageExtent.width, actualExtent.width));
360360
actualExtent.height = std::max(capabilities.minImageExtent.height, std::min(capabilities.maxImageExtent.height, actualExtent.height));
361-
361+
362362
return actualExtent;
363363
}
364364
}
@@ -510,4 +510,4 @@ int main() {
510510
}
511511

512512
return EXIT_SUCCESS;
513-
}
513+
}

0 commit comments

Comments
 (0)