diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 46ee31a763391f65d384d091ec906517bf5ccd1d..0000000000000000000000000000000000000000 --- a/.clang-format +++ /dev/null @@ -1,195 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google - -AccessModifierOffset: -4 -AlignAfterOpenBracket: BlockIndent -AlignArrayOfStructures: Right -AlignConsecutiveAssignments: - Enabled: true - AcrossEmptyLines: false - AcrossComments: true - AlignCompound: false - PadOperators: true -AlignConsecutiveBitFields: - Enabled: true - AcrossEmptyLines: false - AcrossComments: true -AlignConsecutiveDeclarations: - Enabled: true - AcrossEmptyLines: false - AcrossComments: true -AlignConsecutiveMacros: Consecutive -AlignEscapedNewlines: Left -AlignOperands: AlignAfterOperator -AlignTrailingComments: - Kind: Always - OverEmptyLines: 1 -AllowAllArgumentsOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: Empty -AllowShortCaseLabelsOnASingleLine: true -AllowShortEnumsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Empty -AllowShortIfStatementsOnASingleLine: Never -AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: Yes -AttributeMacros: [ ] -BinPackArguments: false -BinPackParameters: false -BitFieldColonSpacing: Both -BraceWrapping: - AfterCaseLabel: false - AfterClass: false - AfterControlStatement: MultiLine - AfterEnum: false - AfterFunction: true - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: true - BeforeLambdaBody: false - BeforeWhile: false - IndentBraces: false - SplitEmptyFunction: false - SplitEmptyNamespace: true -BreakAfterAttributes: Leave -BreakBeforeBinaryOperators: NonAssignment -BreakBeforeBraces: Custom -BreakBeforeConceptDeclarations: Always -# BreakBeforeInlineASMColon: -BreakBeforeTernaryOperators: true -BreakConstructorInitializers: BeforeColon -BreakInheritanceList: BeforeColon -BreakStringLiterals: true -ColumnLimit: 80 -CommentPragmas: '' -CompactNamespaces: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: false -DerivePointerAlignment: false -DisableFormat: false -EmptyLineAfterAccessModifier: Never -EmptyLineBeforeAccessModifier: Always -FixNamespaceComments: true -ForEachMacros: [ 'RANGES_FOR', 'FOREACH' ] -IfMacros: [ 'IF' ] -IncludeBlocks: Regroup -IncludeCategories: - - Regex: '^<glm/' - Priority: 1 - - Regex: '^<vulkan/' - Priority: 2 - - Regex: '<vk_mem_alloc.h>' - Priority: 3 - - Regex: '^<glfw/' - Priority: 4 - - Regex: '^<.*\..*' - Priority: 998 - - Regex: '^<.*' - Priority: 1 - - Regex: '\/.*' - Priority: 999 - - Regex: '.*' - Priority: 1000 -IncludeIsMainRegex: '' -# IncludeIsMainSourceRegex: -IndentAccessModifiers: false -IndentCaseBlocks: false -IndentCaseLabels: true -IndentExternBlock: Indent -IndentGotoLabels: true -IndentPPDirectives: BeforeHash -IndentRequiresClause: true -IndentWidth: 4 -IndentWrappedFunctionNames: true -InsertBraces: true -InsertNewlineAtEOF: true -IntegerLiteralSeparator: - Binary: 4 - Decimal: 3 - Hex: 2 -KeepEmptyLinesAtTheStartOfBlocks: false -LambdaBodyIndentation: Signature -LineEnding: LF -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 2 -NamespaceIndentation: None -NamespaceMacros: [ ] -PPIndentWidth: 2 -PackConstructorInitializers: CurrentLine -#PenaltyBreakAssignment: 10 -#PenaltyBreakBeforeFirstCallParameter: 30 -#PenaltyBreakComment: 10 -#PenaltyBreakFirstLessLess: 0 -#PenaltyBreakOpenParenthesis: 10 -#PenaltyBreakString: 10 -#PenaltyBreakTemplateDeclaration: 20 -#PenaltyExcessCharacter: 1 -#PenaltyIndentedWhitespace: 0 -#PenaltyReturnTypeOnItsOwnLine: 5 -PointerAlignment: Left -QualifierAlignment: Custom -QualifierOrder: [ 'constexpr', 'inline', 'static', 'volatile', 'const', 'type', 'restrict' ] -RawStringFormats: - - Language: Cpp -ReferenceAlignment: Pointer -ReflowComments: true -RemoveBracesLLVM: false -RemoveSemicolon: false -RequiresClausePosition: OwnLine -RequiresExpressionIndentation: OuterScope -SeparateDefinitionBlocks: Always -ShortNamespaceLines: 0 -SortIncludes: CaseInsensitive -SortUsingDeclarations: true -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: true -SpaceAroundPointerQualifiers: Default -SpaceBeforeAssignmentOperators: true -SpaceBeforeCaseColon: false -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatementsExceptControlMacros -SpaceBeforeParensOptions: - AfterControlStatements: true - AfterForeachMacros: false - AfterFunctionDeclarationName: false - AfterFunctionDefinitionName: false - AfterIfMacros: false - AfterOverloadedOperator: false - AfterRequiresInClause: false - AfterRequiresInExpression: true - BeforeNonEmptyParentheses: false -SpaceBeforeRangeBasedForLoopColon: true -SpaceBeforeSquareBrackets: false -SpaceInEmptyBlock: false -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 3 -SpacesInAngles: Never -SpacesInCStyleCastParentheses: false -SpacesInConditionalStatement: false -SpacesInContainerLiterals: false -SpacesInLineCommentPrefix: - Minimum: 1 - Maximum: -1 -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Latest -StatementAttributeLikeMacros: [ ] -StatementMacros: [ ] -TabWidth: 4 -TypenameMacros: [ ] -UseTab: Never -WhitespaceSensitiveMacros: [ ] ---- diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index fc7a882fa1b2f078796cdbdf0a815c40b788b31a..0000000000000000000000000000000000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,115 +0,0 @@ -cmake_minimum_required(VERSION 3.25) - -include(FetchContent) -set(FETCHCONTENT_QUIET OFF) - -project(renderer C CXX) - - -add_executable(${PROJECT_NAME}) - - -option(engine_debug "Turn on debug mode" ON) - - -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) - - -if (MSVC) - target_compile_options(${PROJECT_NAME} PRIVATE - /W4 - /WX - ) -else () - target_compile_options(${PROJECT_NAME} PRIVATE - -Wall - -Wextra - -Werror - -Wno-missing-field-initializers - ) -endif () - - -target_precompile_headers(${PROJECT_NAME} PRIVATE - <algorithm> - <concepts> - <expected> - <fstream> - <functional> - <iostream> - <limits> - <memory> - <ranges> - <set> - <span> - <sstream> - <stdexcept> - <string> - <string_view> - <thread> - <type_traits> - <unordered_map> - <utility> - <vector> - <variant> -) - - -# Vulkan -find_package(Vulkan REQUIRED) -target_compile_definitions(${PROJECT_NAME} PRIVATE - VULKAN_HPP_NO_TO_STRING - VULKAN_HPP_NO_CONSTRUCTORS - VULKAN_HPP_NO_SETTERS - VULKAN_HPP_NO_SPACESHIP_OPERATOR -) -if (engine_debug) - target_compile_definitions(${PROJECT_NAME} PRIVATE ENGINE_VULKAN_DEBUG) -endif () -target_link_libraries(${PROJECT_NAME} PRIVATE Vulkan::Vulkan) - -# VulkanMemoryAllocator -set(STATIC_VULKAN_FUNCTIONS 0) -set(DYNAMIC_VULKAN_FUNCTIONS 1) -FetchContent_Declare(VulkanMemoryAllocator - GIT_REPOSITORY https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git - GIT_TAG 2f382df - GIT_PROGRESS TRUE - SYSTEM -) -FetchContent_MakeAvailable(VulkanMemoryAllocator) -target_compile_definitions(${PROJECT_NAME} PRIVATE - VMA_STATIC_VULKAN_FUNCTIONS=${STATIC_VULKAN_FUNCTIONS} - VMA_DYNAMIC_VULKAN_FUNCTIONS=${DYNAMIC_VULKAN_FUNCTIONS} -) -target_link_libraries(${PROJECT_NAME} PRIVATE VulkanMemoryAllocator) - -# GLFW -FetchContent_Declare(GLFW - GIT_REPOSITORY https://github.com/glfw/glfw.git - GIT_TAG 3.3.9 - GIT_PROGRESS TRUE - SYSTEM -) -FetchContent_MakeAvailable(GLFW) -target_compile_definitions(${PROJECT_NAME} PRIVATE - GLFW_INCLUDE_VULKAN -) -target_link_libraries(${PROJECT_NAME} PRIVATE glfw) - -# glm -FetchContent_Declare(glm - GIT_REPOSITORY https://github.com/g-truc/glm.git - GIT_TAG 0.9.9.8 - GIT_PROGRESS TRUE - SYSTEM -) -FetchContent_MakeAvailable(glm) -target_compile_definitions(${PROJECT_NAME} PRIVATE - GLM_FORCE_DEPTH_ZERO_TO_ONE -) -target_precompile_headers(${PROJECT_NAME} PRIVATE <glm/glm.hpp>) -target_link_libraries(${PROJECT_NAME} PRIVATE glm::glm) - - -add_subdirectory(src) diff --git a/src/App.cpp b/src/App.cpp deleted file mode 100644 index f7f656ff21a8ec6432e75d39bb4df60ef7f7526e..0000000000000000000000000000000000000000 --- a/src/App.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "App.hpp" - -#include <iostream> - -void App::run() -{ - std::cout << "Hello World!\n"; -} diff --git a/src/App.hpp b/src/App.hpp deleted file mode 100644 index 31131e74438cc58985cfc65466bb111bb825255b..0000000000000000000000000000000000000000 --- a/src/App.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -class App { -public: - void run(); -}; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 8e99fbf3e1f51e4a60c336fddbca96ed35d771d3..0000000000000000000000000000000000000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -target_sources(${PROJECT_NAME} PRIVATE - App.cpp - main.cpp -) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp deleted file mode 100644 index f1161cf34310181e86d92e32bbcc143b1fe7906b..0000000000000000000000000000000000000000 --- a/src/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "App.hpp" - -int main() -{ - App{}.run(); -}