Skip to content

Commit

Permalink
[*] Cleanup includes
Browse files Browse the repository at this point in the history
Closes #177
  • Loading branch information
yeetari committed May 20, 2020
1 parent 9b63831 commit a83f916
Show file tree
Hide file tree
Showing 56 changed files with 174 additions and 138 deletions.
2 changes: 2 additions & 0 deletions example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "inexor/vulkan-renderer/application.hpp"

#include "inexor/vulkan-renderer/error_handling.hpp"

#include <spdlog/async.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>
Expand Down
15 changes: 6 additions & 9 deletions include/inexor/vulkan-renderer/application.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
#pragma once

#include "inexor/vulkan-renderer/camera.hpp"
#include "inexor/vulkan-renderer/debug_callback.hpp"
#include "inexor/vulkan-renderer/error_handling.hpp"
#include "inexor/vulkan-renderer/mesh_buffer.hpp"
#include "inexor/vulkan-renderer/renderer.hpp"
#include "inexor/vulkan-renderer/standard_ubo.hpp"
#include "inexor/vulkan-renderer/thread_pool.hpp"
#include "inexor/vulkan-renderer/tools/cla_parser.hpp"
#include "inexor/vulkan-renderer/world/cube.hpp"

#include <GLFW/glfw3.h>
#include <spdlog/spdlog.h>
#include <toml11/toml.hpp>
#include <vulkan/vulkan_core.h>

#include <cstdint>
#include <memory>
#include <string>
#include <vector>

namespace inexor::vulkan_renderer {

Expand Down
6 changes: 2 additions & 4 deletions include/inexor/vulkan-renderer/availability_checks.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#pragma once

#include "inexor/vulkan-renderer/error_handling.hpp"
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <optional>
#include <shared_mutex>
#include <cstdint>
#include <string>
#include <vector>

Expand Down
2 changes: 0 additions & 2 deletions include/inexor/vulkan-renderer/camera.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#pragma once

#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>

namespace inexor::vulkan_renderer {

Expand Down
5 changes: 3 additions & 2 deletions include/inexor/vulkan-renderer/debug_callback.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#pragma once

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <string>

namespace inexor::vulkan_renderer {

Expand Down
6 changes: 2 additions & 4 deletions include/inexor/vulkan-renderer/debug_marker_manager.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#pragma once

#include <glm/glm.hpp>
#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <vector>
#include <string>

namespace inexor::vulkan_renderer {

Expand Down
7 changes: 3 additions & 4 deletions include/inexor/vulkan-renderer/descriptor.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once

#include <cassert>
#include <vulkan/vulkan_core.h>

#include <cstdint>
#include <string>
#include <vector>

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>

namespace inexor::vulkan_renderer {

/// @brief TODO
Expand Down
3 changes: 1 addition & 2 deletions include/inexor/vulkan-renderer/error_handling.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <string>

Expand Down
6 changes: 3 additions & 3 deletions include/inexor/vulkan-renderer/fence_manager.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#pragma once

#include "inexor/vulkan-renderer/debug_marker_manager.hpp"
#include "inexor/vulkan-renderer/error_handling.hpp"
#include "inexor/vulkan-renderer/manager_template.hpp"

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <memory>
#include <mutex>
#include <optional>
#include <string>

namespace inexor::vulkan_renderer {

Expand Down
1 change: 1 addition & 0 deletions include/inexor/vulkan-renderer/fps_counter.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <chrono>
#include <cstdint>
#include <optional>

namespace inexor::vulkan_renderer {
Expand Down
10 changes: 1 addition & 9 deletions include/inexor/vulkan-renderer/gpu_info.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#pragma once

#include "inexor/vulkan-renderer/error_handling.hpp"
#include "inexor/vulkan-renderer/surface_formats.hpp"

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>

#include <cassert>
#include <unordered_map>
#include <vector>
#include <vulkan/vulkan_core.h>

namespace inexor::vulkan_renderer {

Expand Down
3 changes: 1 addition & 2 deletions include/inexor/vulkan-renderer/gpu_memory_buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#pragma once

#include <spdlog/spdlog.h>
#include <vma/vk_mem_alloc.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <string>

Expand Down
2 changes: 0 additions & 2 deletions include/inexor/vulkan-renderer/image_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include <vma/vma_usage.h>

#include <optional>

namespace inexor::vulkan_renderer {

struct ImageBuffer {
Expand Down
3 changes: 3 additions & 0 deletions include/inexor/vulkan-renderer/manager_template.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#pragma once

#include <cstdint>
#include <memory>
#include <optional>
#include <shared_mutex>
#include <string>
#include <unordered_map>
#include <vector>

Expand Down
7 changes: 4 additions & 3 deletions include/inexor/vulkan-renderer/mesh_buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#pragma once

#include "inexor/vulkan-renderer/gpu_memory_buffer.hpp"
#include "inexor/vulkan-renderer/once_command_buffer.hpp"
#include "inexor/vulkan-renderer/staging_buffer.hpp"

#include <vma/vma_usage.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <cstdint>
#include <optional>
#include <string>

namespace inexor::vulkan_renderer {

Expand Down
3 changes: 1 addition & 2 deletions include/inexor/vulkan-renderer/octree_vertex.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#pragma once

#include <glm/glm.hpp>

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <array>

Expand Down
8 changes: 3 additions & 5 deletions include/inexor/vulkan-renderer/once_command_buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#pragma once

#include "wrapper/command_pool.hpp"
#include "inexor/vulkan-renderer/wrapper/command_pool.hpp"

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <stdexcept>
#include <cstdint>

namespace inexor::vulkan_renderer {

Expand Down
22 changes: 5 additions & 17 deletions include/inexor/vulkan-renderer/renderer.hpp
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
#pragma once

#include "availability_checks.hpp"
#include "inexor/vulkan-renderer/availability_checks.hpp"
#include "inexor/vulkan-renderer/camera.hpp"
#include "inexor/vulkan-renderer/debug_marker_manager.hpp"
#include "inexor/vulkan-renderer/descriptor.hpp"
#include "inexor/vulkan-renderer/error_handling.hpp"
#include "inexor/vulkan-renderer/fence_manager.hpp"
#include "inexor/vulkan-renderer/fps_counter.hpp"
#include "inexor/vulkan-renderer/gpu_info.hpp"
#include "inexor/vulkan-renderer/image_buffer.hpp"
#include "inexor/vulkan-renderer/mesh_buffer.hpp"
#include "inexor/vulkan-renderer/msaa_target.hpp"
#include "inexor/vulkan-renderer/octree_vertex.hpp"
#include "inexor/vulkan-renderer/semaphore_manager.hpp"
#include "inexor/vulkan-renderer/settings_decision_maker.hpp"
#include "inexor/vulkan-renderer/standard_ubo.hpp"
#include "inexor/vulkan-renderer/shader.hpp"
#include "inexor/vulkan-renderer/texture.hpp"
#include "inexor/vulkan-renderer/time_step.hpp"
#include "inexor/vulkan-renderer/uniform_buffer.hpp"

// Those components have been refactored to fulfill RAII idioms.
#include "inexor/vulkan-renderer/shader.hpp"
#include "inexor/vulkan-renderer/wrapper/command_pool.hpp"
#include "inexor/vulkan-renderer/wrapper/device.hpp"
#include "inexor/vulkan-renderer/wrapper/glfw_context.hpp"
Expand All @@ -30,16 +24,10 @@
#include "inexor/vulkan-renderer/wrapper/window.hpp"
#include "inexor/vulkan-renderer/wrapper/window_surface.hpp"

#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/mat4x4.hpp>
#include <glm/vec4.hpp>
#include <spdlog/spdlog.h>
#include <vulkan/vulkan_core.h>

#include <chrono>
#include <fstream>
#include <iostream>
#include <string>
#include <cstdint>
#include <memory>
#include <vector>

namespace inexor::vulkan_renderer {
Expand Down
6 changes: 2 additions & 4 deletions include/inexor/vulkan-renderer/semaphore_manager.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#pragma once

#include "inexor/vulkan-renderer/debug_marker_manager.hpp"
#include "inexor/vulkan-renderer/error_handling.hpp"
#include "inexor/vulkan-renderer/manager_template.hpp"

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <memory>
#include <mutex>

namespace inexor::vulkan_renderer {
Expand Down
8 changes: 1 addition & 7 deletions include/inexor/vulkan-renderer/settings_decision_maker.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#pragma once

#include "inexor/vulkan-renderer/error_handling.hpp"
#include <vulkan/vulkan_core.h>

#include <vulkan/vulkan.h>

#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iostream>
#include <map>
#include <optional>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion include/inexor/vulkan-renderer/shader.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <string>
#include <vector>
Expand Down
4 changes: 1 addition & 3 deletions include/inexor/vulkan-renderer/staging_buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
#include "inexor/vulkan-renderer/gpu_memory_buffer.hpp"
#include "inexor/vulkan-renderer/once_command_buffer.hpp"

#include <vulkan/vulkan.h>

#include <cassert>
#include <vulkan/vulkan_core.h>

namespace inexor::vulkan_renderer {

Expand Down
12 changes: 2 additions & 10 deletions include/inexor/vulkan-renderer/texture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@

#include "inexor/vulkan-renderer/gpu_memory_buffer.hpp"
#include "inexor/vulkan-renderer/once_command_buffer.hpp"
#include "inexor/vulkan-renderer/staging_buffer.hpp"

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <cassert>
#include <cstdint>
#include <string>

#include <nlohmann/json.hpp>
#include <spdlog/spdlog.h>
#include <vma/vma_usage.h>
#include <vulkan/vulkan.h>
#define TINYGLTF_NO_INCLUDE_JSON
#include <tiny_gltf/tiny_gltf.h>

namespace inexor::vulkan_renderer {

// TODO: 3D textures and cube maps.
Expand Down
5 changes: 1 addition & 4 deletions include/inexor/vulkan-renderer/tools/file.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#pragma once

#include <spdlog/spdlog.h>

#include <cassert>
#include <fstream>
#include <cstdint>
#include <string>
#include <vector>

Expand Down
6 changes: 2 additions & 4 deletions include/inexor/vulkan-renderer/uniform_buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#pragma once

#include "gpu_memory_buffer.hpp"
#include "inexor/vulkan-renderer/gpu_memory_buffer.hpp"

#include <spdlog/spdlog.h>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include <shared_mutex>
#include <string>

namespace inexor::vulkan_renderer {
Expand Down
5 changes: 1 addition & 4 deletions include/inexor/vulkan-renderer/world/bit_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

#include <boost/dynamic_bitset.hpp>

#include <cassert>
#include <array>
#include <cstdint>
#include <fstream>
#include <iostream>
#include <optional>
#include <vector>

namespace inexor::vulkan_renderer::world {
constexpr std::array<std::uint8_t, 9> KEEP_FIRST_N_BITS{0b0000'0000, 0b1000'0000, 0b1100'0000, 0b1110'0000, 0b1111'0000,
Expand Down
4 changes: 2 additions & 2 deletions include/inexor/vulkan-renderer/world/cube.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <boost/signals2.hpp>
#include <glm/vec3.hpp>

#include <functional>
#include <iostream>
#include <array>
#include <cstdint>
#include <optional>

namespace inexor::vulkan_renderer::world {
Expand Down
Loading

0 comments on commit a83f916

Please sign in to comment.