Skip to content

Commit 8b2ae77

Browse files
authored
Merge pull request #17 from benjamaan476/viewport
Viewport
2 parents c47032a + 2ca0337 commit 8b2ae77

File tree

109 files changed

+1288
-1221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1288
-1221
lines changed

.clang-tidy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ Checks: "*,
2020
-hicpp-signed-bitwise,
2121
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
2222
-cppcoreguidelines-pro-type-cstyle-cast,
23+
-cppcoreguidelines-pro-type-union-access,
2324
-missing-field-initializers,
25+
-hicpp-uppercase-literal-suffix,
26+
-cppcoreguidlines-avoid-magic-numbers,
2427
"
2528
WarningsAsErrors: ''
2629
HeaderFilterRegex: ''

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ conan-cache/
66

77
# User spesific settings
88
CMakeUserPresets.json
9+
compile_commands.json
910

1011
# IDE files
1112
.vs/
@@ -34,3 +35,5 @@ ehthumbs.db
3435
Thumbs.db
3536
*.spv
3637
.cache
38+
39+
compile_commands.json

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ cmake_minimum_required(VERSION 3.21)
55
# manual dependency management
66

77
# Only set the cxx_standard if it is not set by someone else
8-
if (NOT DEFINED CMAKE_CXX_STANDARD)
98
set(CMAKE_CXX_STANDARD 23)
10-
endif()
119

1210
# strongly encouraged to enable this globally to avoid conflicts between
1311
# -Wpedantic being enabled and -std=c++20 and -std=gnu++20 for example
@@ -64,7 +62,13 @@ if(DEFINED TRACY_ENABLE)
6462
add_subdirectory (tracy)
6563
endif()
6664

67-
add_definitions(-DENABLE_DEBUG_MACRO)
65+
if(CMAKE_BUILD_TYPE EQUAL "Debug")
66+
add_definitions(-DENABLE_DEBUG_MACRO)
67+
endif()
68+
69+
if(MSVC)
70+
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
71+
endif()
6872

6973
# Adding the src:
7074
add_subdirectory(engine)

CMakePresets.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
},
140140
{
141141
"name": "unixlike-gcc-debug",
142-
"displayName": "gcc Debug",
142+
"displayName": "unix gcc Debug",
143143
"description": "Target Unix-like OS with the gcc compiler, debug build type",
144144
"inherits": "conf-unixlike-common",
145145
"cacheVariables": {
@@ -150,7 +150,7 @@
150150
},
151151
{
152152
"name": "unixlike-gcc-release",
153-
"displayName": "gcc Release",
153+
"displayName": "unix gcc Release",
154154
"description": "Target Unix-like OS with the gcc compiler, release build type",
155155
"inherits": "conf-unixlike-common",
156156
"cacheVariables": {
@@ -161,7 +161,7 @@
161161
},
162162
{
163163
"name": "unixlike-clang-debug",
164-
"displayName": "clang Debug",
164+
"displayName": "unix clang Debug",
165165
"description": "Target Unix-like OS with the clang compiler, debug build type",
166166
"inherits": "conf-unixlike-common",
167167
"cacheVariables": {
@@ -172,7 +172,7 @@
172172
},
173173
{
174174
"name": "unixlike-clang-release",
175-
"displayName": "clang Release",
175+
"displayName": "unix clang Release",
176176
"description": "Target Unix-like OS with the clang compiler, release build type",
177177
"inherits": "conf-unixlike-common",
178178
"cacheVariables": {
@@ -252,4 +252,4 @@
252252
"configurePreset": "unixlike-clang-release"
253253
}
254254
]
255-
}
255+
}

ProjectOptions.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ macro(egakeru_supports_sanitizers)
1515
else()
1616
set(SUPPORTS_ASAN ON)
1717
endif()
18+
19+
set(SUPPORTS_ASAN OFF)
20+
set(SUPPORTS_UBSAN OFF)
1821
endmacro()
1922

2023
macro(egakeru_setup_options)
@@ -55,7 +58,7 @@ macro(egakeru_setup_options)
5558
option(egakeru_ENABLE_UNITY_BUILD "Enable unity builds" OFF)
5659
option(egakeru_ENABLE_CLANG_TIDY "Enable clang-tidy" OFF)
5760
option(egakeru_ENABLE_CPPCHECK "Enable cpp-check analysis" ON)
58-
option(egakeru_ENABLE_PCH "Enable precompiled headers" ON)
61+
option(egakeru_ENABLE_PCH "Enable precompiled headers" OFF)
5962
option(egakeru_ENABLE_CACHE "Enable ccache" OFF)
6063
endif()
6164

assets/meshes/output.esm

-29.2 KB
Binary file not shown.

cmake/CompilerWarnings.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ function(
6464
-Wno-exit-time-destructors
6565
-Wno-global-constructors
6666
-Wno-covered-switch-default
67-
-Wno-unsafe-buffer-usage
6867
-Wno-switch-enum
6968
-Wno-disabled-macro-expansion
70-
-Wno-cast-function-type-strict
7169
-Wno-implicit-int-float-conversion
7270
-Wno-ctad-maybe-unsupported
7371
-Wno-c++20-compat
7472
-Wno-deprecated-copy-with-user-provided-dtor
7573
-Wno-cast-align
7674
-Wno-vla-extension
75+
-Wno-unsafe-buffer-usage
76+
-Wno-cast-function-type-strict
7777
)
7878
endif()
7979

compile_commands.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/home/bencrabbe/code/egakeru/out/build/unixlike-clang-release/compile_commands.json
1+
/home/bencrabbe/code/egakeru/out/build/unixlike-clang-debug/compile_commands.json

engine/application/application.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ namespace egkr
1616
class application
1717
{
1818
public:
19-
2019
using unique_ptr = std::unique_ptr<application>;
2120
API explicit application(engine_configuration configuration);
2221

2322
API virtual ~application() = default;
2423

2524
virtual bool init() = 0;
2625
virtual void update(const frame_data& frame_data) = 0;
27-
virtual void render(render_packet* render_packet, const frame_data& frame_data) = 0;
26+
virtual void prepare_render_packet(render_packet* render_packet, const frame_data& frame_data) = 0;
27+
virtual void render(egkr::render_packet* render_packet, egkr::frame_data& frame_data) = 0;
2828
virtual bool resize(uint32_t width, uint32_t height) = 0;
2929

3030
virtual bool boot() = 0;

engine/debug/debug_grid.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace egkr::debug
99

1010
debug_grid::debug_grid(const configuration& configuration)
1111
: name_{ configuration.name },
12-
orientation_{ configuration.orientation },
12+
orientation_{ configuration.grid_orientation },
1313
tile_count_dim0_{ configuration.tile_count_dim0 },
1414
tile_count_dim1_{ configuration.tile_count_dim1 },
1515
tile_scale_{ configuration.tile_scale }
@@ -146,11 +146,8 @@ namespace egkr::debug
146146

147147
}
148148

149-
debug_grid::~debug_grid()
150-
{
151-
}
152149

153-
bool debug_grid::load()
150+
bool debug_grid::load()
154151
{
155152
geometry::properties properties{};
156153
properties.name = "degug_grid";

0 commit comments

Comments
 (0)