Fixed release build

This commit is contained in:
Simon Lübeß
2022-01-05 15:36:34 +01:00
parent 826ac68873
commit 6199496987
3 changed files with 16 additions and 9 deletions
+2 -7
View File
@@ -1,11 +1,9 @@
FileVersion = 1 FileVersion = 1
Dependencies = {GlitchLog = "*", corlib = "*", DirectX = "*", DirectXTK = "*", FreeType = "*", cgltf-beef = "*", msdfgen-beef = "*", ImGui = "*", ImGuiImplDX11 = "*", ImGuiImplWin32 = "*", ImGuizmo = "*", Beefy2D = "*"} Dependencies = {GlitchLog = "*", corlib = "*", DirectX = "*", DirectXTK = "*", FreeType = "*", cgltf-beef = "*", msdfgen-beef = "*", ImGui = "*", ImGuiImplDX11 = "*", ImGuiImplWin32 = "*", ImGuizmo = "*", Beefy2D = "*", LodePng = "*"}
[Project] [Project]
Name = "GlitchyEngine" Name = "GlitchyEngine"
ProcessorMacros = ["GE_GRAPHICS_DX11", "GE_PROFILE", "GE_SHADER_MATRIX_MISMATCH_IS_ERROR", "GE_SHADER_VAR_TYPE_MISMATCH_IS_ERROR", "GE_SHADER_UNUSED_VARIABLE_IS_WARNING", "GE_WINDOWS"]
[Configs.Debug.Win64]
PreprocessorMacros = ["DEBUG", "GE_GRAPHICS_DX11", "GE_PROFILE", "GE_SHADER_MATRIX_MISMATCH_IS_ERROR", "GE_SHADER_VAR_TYPE_MISMATCH_IS_ERROR", "GE_SHADER_UNUSED_VARIABLE_IS_WARNING"]
[Configs.Paranoid.Win32] [Configs.Paranoid.Win32]
PreprocessorMacros = ["DEBUG", "PARANOID", "GE_WINDOWS"] PreprocessorMacros = ["DEBUG", "PARANOID", "GE_WINDOWS"]
@@ -16,9 +14,6 @@ PreprocessorMacros = ["DEBUG", "PARANOID", "GE_WINDOWS"]
[Configs.Release.Win32] [Configs.Release.Win32]
PreprocessorMacros = ["RELEASE", "GE_WINDOWS"] PreprocessorMacros = ["RELEASE", "GE_WINDOWS"]
[Configs.Release.Win64]
PreprocessorMacros = ["RELEASE", "GE_WINDOWS"]
[Configs.Test.Win32] [Configs.Test.Win32]
PreprocessorMacros = ["TEST", "GE_WINDOWS"] PreprocessorMacros = ["TEST", "GE_WINDOWS"]
+12
View File
@@ -280,7 +280,9 @@ namespace GlitchyEngine.Renderer
public static void Deinit() public static void Deinit()
{ {
#if DEBUG
Log.EngineLogger.AssertDebug(s_initialized, "Renderer2D was not initialized."); Log.EngineLogger.AssertDebug(s_initialized, "Renderer2D was not initialized.");
#endif
FontRenderer.Deinit(); FontRenderer.Deinit();
@@ -311,8 +313,10 @@ namespace GlitchyEngine.Renderer
public static void BeginScene(OrthographicCamera camera, DrawOrder drawOrder = .SortByTexture, Effect effect = null, Effect circleEffect = null) public static void BeginScene(OrthographicCamera camera, DrawOrder drawOrder = .SortByTexture, Effect effect = null, Effect circleEffect = null)
{ {
#if DEBUG
Log.EngineLogger.AssertDebug(s_initialized, "Renderer2D was not initialized."); Log.EngineLogger.AssertDebug(s_initialized, "Renderer2D was not initialized.");
Log.EngineLogger.AssertDebug(!s_sceneRunning, "You have to call EndScene before you can make another call to BeginScene."); Log.EngineLogger.AssertDebug(!s_sceneRunning, "You have to call EndScene before you can make another call to BeginScene.");
#endif
//s_textureColorEffect.Bind(Renderer._context); //s_textureColorEffect.Bind(Renderer._context);
@@ -348,7 +352,9 @@ namespace GlitchyEngine.Renderer
public static void EndScene() public static void EndScene()
{ {
#if DEBUG
Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene."); Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene.");
#endif
Flush(); Flush();
#if DEBUG #if DEBUG
@@ -358,7 +364,9 @@ namespace GlitchyEngine.Renderer
public static void Flush() public static void Flush()
{ {
#if DEBUG
Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene."); Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene.");
#endif
if(s_drawOrder != .Immediate) if(s_drawOrder != .Immediate)
DrawDeferred(); DrawDeferred();
@@ -575,7 +583,9 @@ namespace GlitchyEngine.Renderer
public static void DrawQuad(Vector3 position, Vector2 size, float rotation, Texture2D texture, ColorRGBA color = .White, Vector4 uvTransform = .(0, 0, 1, 1)) public static void DrawQuad(Vector3 position, Vector2 size, float rotation, Texture2D texture, ColorRGBA color = .White, Vector4 uvTransform = .(0, 0, 1, 1))
{ {
#if DEBUG
Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene."); Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene.");
#endif
Matrix transform = Matrix.Translation(position) * Matrix.RotationZ(rotation) * Matrix.Scaling(size.X, size.Y, 1.0f); Matrix transform = Matrix.Translation(position) * Matrix.RotationZ(rotation) * Matrix.Scaling(size.X, size.Y, 1.0f);
@@ -611,7 +621,9 @@ namespace GlitchyEngine.Renderer
public static void DrawCircle(Vector3 position, Vector2 size, Texture2D texture, ColorRGBA color = .White, float innerRadius = 1.0f, Vector4 uvTransform = .(0, 0, 1, 1)) public static void DrawCircle(Vector3 position, Vector2 size, Texture2D texture, ColorRGBA color = .White, float innerRadius = 1.0f, Vector4 uvTransform = .(0, 0, 1, 1))
{ {
#if DEBUG
Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene."); Log.EngineLogger.AssertDebug(s_sceneRunning, "Missing call of BeginScene.");
#endif
Matrix transform = Matrix.Translation(position) * Matrix.Scaling(size.X, size.Y, 1.0f); Matrix transform = Matrix.Translation(position) * Matrix.Scaling(size.X, size.Y, 1.0f);