Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit c87092f

Browse files
TymianekPLkarnkaul
andauthored
Tymii/17 inconsistent file naming (#19)
* Fix inconsistent file & namespace naming * Fix clang format * fix casing uwu * gh checks * casing * casing * fix chmod for scripts * fix cmakelists * meow * cmakelists * github * owo * fix namespace Detail references * FormatCheckDiff.sh * format code * Fix builds * Fix shaders --------- Co-authored-by: Karn Kaul <[email protected]>
1 parent 66799bf commit c87092f

34 files changed

+117
-119
lines changed
File renamed without changes.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
steps:
77
- uses: actions/checkout@v4
88
- name: format code
9-
run: scripts/format_code.sh
9+
run: chmod a+x Scripts/FormatCode.sh; Scripts/FormatCode.sh
1010
- name: check diff
11-
run: .github/format_check_diff.sh
11+
run: chmod a+x .github/FormatCheckDiff.sh; .github/FormatCheckDiff.sh
1212
linux-gcc:
1313
runs-on: ubuntu-latest
1414
steps:
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
project(${project_name}-app)
1+
project(${project_name}-App)
22

33
add_executable(${PROJECT_NAME})
44

55
target_link_libraries(${PROJECT_NAME} PRIVATE
6-
${project_name}::lib
6+
${project_name}::Lib
77
)
88

9-
target_precompile_headers(${PROJECT_NAME} REUSE_FROM ${project_name}-lib)
9+
target_precompile_headers(${PROJECT_NAME} REUSE_FROM ${project_name}-Lib)
1010

11-
file(GLOB_RECURSE sources LIST_DIRECTORIES false "src/*.[hc]pp")
11+
file(GLOB_RECURSE sources LIST_DIRECTORIES false "Src/*.[hc]pp")
1212
target_sources(${PROJECT_NAME} PRIVATE
1313
${sources}
1414
)

app/src/main.cpp renamed to App/Src/Main.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include <imgui.h>
2+
#include <Tkge/Engine.hpp>
3+
#include <Tkge/Graphics/Shader.hpp>
24
#include <klib/assert.hpp>
3-
#include <tkge/engine.hpp>
45
#include <exception>
56
#include <print>
67

7-
// temporary, until we have shader assets.
8-
#include <tkge/graphics/shader.hpp>
8+
// temporary, until we have shader Assets.
99
#include <filesystem>
1010
#include <fstream>
1111
#include <vector>
@@ -41,27 +41,27 @@ namespace
4141

4242
void Run(const fs::path& assets_path)
4343
{
44-
static constexpr tkge::WindowSurface surface{.size = {1280, 720}};
45-
tkge::Engine engine{surface};
44+
static constexpr Tkge::WindowSurface surface{.size = {1280, 720}};
45+
Tkge::Engine engine{surface};
4646

47-
auto shader = tkge::graphics::Shader{};
48-
const auto vertexSpirV = LoadSpirV((assets_path / "shaders/default.vert").string().c_str());
49-
const auto fragmentSpirV = LoadSpirV((assets_path / "shaders/default.frag").string().c_str());
47+
auto shader = Tkge::Graphics::Shader{};
48+
const auto vertexSpirV = LoadSpirV((assets_path / "Shaders/Default.vert").string().c_str());
49+
const auto fragmentSpirV = LoadSpirV((assets_path / "Shaders/Default.frag").string().c_str());
5050
const auto& renderDevice = engine.RenderDevice();
5151
if (!shader.Load(renderDevice.get_device(), vertexSpirV, fragmentSpirV)) { throw std::runtime_error{"Failed to load shaders"}; }
5252

5353
constexpr auto vertices = std::array{
54-
tkge::graphics::Vertex{.position = {-0.5f, -0.5f}, .colour = kvf::red_v.to_vec4()},
55-
tkge::graphics::Vertex{.position = {0.5f, -0.5f}, .colour = kvf::green_v.to_vec4()},
56-
tkge::graphics::Vertex{.position = {0.5f, 0.5f}, .colour = kvf::blue_v.to_vec4()},
57-
tkge::graphics::Vertex{.position = {-0.5f, 0.5f}, .colour = kvf::yellow_v.to_vec4()},
54+
Tkge::Graphics::Vertex{.position = {-0.5f, -0.5f}, .colour = kvf::red_v.to_vec4()},
55+
Tkge::Graphics::Vertex{.position = {0.5f, -0.5f}, .colour = kvf::green_v.to_vec4()},
56+
Tkge::Graphics::Vertex{.position = {0.5f, 0.5f}, .colour = kvf::blue_v.to_vec4()},
57+
Tkge::Graphics::Vertex{.position = {-0.5f, 0.5f}, .colour = kvf::yellow_v.to_vec4()},
5858
};
5959

6060
constexpr auto indices = std::array{
6161
0u, 1u, 2u, 2u, 3u, 0u,
6262
};
6363

64-
const auto primitive = tkge::graphics::Primitive{
64+
const auto primitive = Tkge::Graphics::Primitive{
6565
.vertices = vertices,
6666
.indices = indices,
6767
};
@@ -100,7 +100,7 @@ int main([[maybe_unused]] int argc, char** argv)
100100
try
101101
{
102102
KLIB_ASSERT(argc > 0);
103-
const auto assets_path = Upfind(*argv, "assets");
103+
const auto assets_path = Upfind(*argv, "Assets");
104104
Run(assets_path);
105105
}
106106
catch (const std::exception& e)
File renamed without changes.
File renamed without changes.

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
cmake_minimum_required(VERSION 3.24)
22

3-
set(project_name tkge)
3+
set(project_name Tkge)
44
project(${project_name})
55

66
set(CMAKE_CXX_STANDARD 23)
77
set(CMAKE_CXX_STANDARD_REQUIRED ON)
88
set(CMAKE_CXX_EXTENSIONS OFF)
99
set(CMAKE_DEBUG_POSTFIX "-d")
1010

11-
add_subdirectory(ext)
11+
add_subdirectory(Ext)
1212

13-
add_subdirectory(lib)
14-
add_subdirectory(app)
13+
add_subdirectory(Lib)
14+
add_subdirectory(App)
File renamed without changes.
File renamed without changes.

ext/src.zip renamed to Ext/src.zip

File renamed without changes.

0 commit comments

Comments
 (0)