Skip to content

Commit c9f759a

Browse files
clang-format remove header re-ordering
- ImGuizmo header was throwing errors because of being re-ordered during the clang-format step - Few fixes on imgui methods, adding a %s parameter to silence warning about strings - Various fixes to silence some warnings - Current warning is related to enums of different types being used in some vulkan calls
1 parent 6d9b689 commit c9f759a

5 files changed

Lines changed: 21 additions & 7 deletions

File tree

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ PenaltyBreakTemplateDeclaration: 100
120120
PenaltyReturnTypeOnItsOwnLine: 300
121121
PointerAlignment: Left
122122
ReflowComments: true
123-
SortIncludes: true
123+
SortIncludes: false
124124
SortUsingDeclarations: true
125125
SpaceAfterCStyleCast: true
126126
SpaceAfterLogicalNot: false

Scripts/BuildEngine.ps1

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
108108
Write-Host "Building $systemName $architecture $configuration"
109109

110110
[string]$BuildDirectoryNameExtension = If ($isMultipleConfig) { "MultiConfig" } Else { $configuration }
111-
[string]$BuildDirectoryName = "../"+"builds/renderengine"
111+
[string]$BuildDirectoryName = "Result." + $systemName + "." + $architecture + "." + $BuildDirectoryNameExtension
112112
[string]$buildDirectoryPath = [IO.Path]::Combine($RepoRoot, $BuildDirectoryName)
113113
[string]$cMakeCacheVariableOverride = ""
114114
[string]$cMakeGenerator = "Ninja"
@@ -119,7 +119,20 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
119119
}
120120

121121
# Define CMake Generator argument
122-
122+
switch ($systemName) {
123+
"Windows" {
124+
switch ($VsVersion) {
125+
2022 {
126+
$cMakeGenerator = "-G `"Visual Studio 17 2022`" -A $architecture"
127+
}
128+
Default {
129+
throw 'This version of Visual Studio is not supported'
130+
}
131+
}
132+
$cMakeCacheVariableOverride += ' -DCMAKE_CONFIGURATION_TYPES=Debug;Release '
133+
}
134+
"Linux" {
135+
$cMakeGenerator = "-G Ninja"
123136

124137
$cMakeArguments = " -S $repositoryRootPath -B $buildDirectoryPath -G $cMakeGenerator $cMakeCacheVariableOverride -DCMAKE_BUILD_TYPE=$configuration"
125138

Scripts/Shared.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ function Find-GlslangValidator () {
185185

186186
function Find-ClangFormat () {
187187
$repoConfiguration = Get-RepositoryConfiguration
188-
# $LLVMMinimumVersion = $repoConfiguration.Requirements.LLVM.Version
189-
# $LLVMMaximumVersion = $repoConfiguration.Requirements.LLVM.MaximumVersion
190188

191189
$candidates = @(
192190
'clang-format'
@@ -213,6 +211,9 @@ function Find-ClangFormat () {
213211
}
214212

215213
function Setup-ShaderCCompilerTool () {
214+
if($IsLinux) {
215+
return
216+
}
216217
$repoConfiguration = Get-RepositoryConfiguration
217218
$repositoryToolPath = $repoConfiguration.Paths.Tools
218219

Tetragrama/Components/DockspaceUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ namespace Tetragrama::Components
254254

255255
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[0]);
256256
ImGui::SetCursorPos(ImVec2(10, wind_size.y - 30));
257-
ImGui::TextColored(s_scene_serializer_log_color, s_scene_serializer_log);
257+
ImGui::TextColored(s_scene_serializer_log_color, "%s", s_scene_serializer_log);
258258
ImGui::PopFont();
259259

260260
ImGui::EndPopup();

Tetragrama/Components/HierarchyViewUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include <ImGuizmo.h>
21
#include <Tetragrama/Components/HierarchyViewUIComponent.h>
32
#include <Tetragrama/Editor.h>
43
#include <Tetragrama/Inputs/Keyboard.h>
@@ -12,6 +11,7 @@
1211
#include <glm/glm.hpp>
1312
#include <glm/gtc/type_ptr.hpp>
1413
#include <imgui.h>
14+
#include <ImGuizmo.h>
1515
#include <stack>
1616

1717
using namespace ZEngine;

0 commit comments

Comments
 (0)