From 7955fda96dbd30f42279699ff793aecbf73dbbb8 Mon Sep 17 00:00:00 2001 From: onox Date: Sun, 19 May 2024 18:05:02 +0200 Subject: [PATCH] orka: Remove part of some pre conditions which can never be false --- orka/src/orka/orka-rendering-debug-coordinate_axes.ads | 3 +-- orka/src/orka/orka-rendering-debug-spheres.ads | 2 +- orka/src/orka/orka-rendering-shaders-modules.adb | 1 - orka/src/orka/orka-rendering-shaders.adb | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/orka/src/orka/orka-rendering-debug-coordinate_axes.ads b/orka/src/orka/orka-rendering-debug-coordinate_axes.ads index 0a290cd7..7ffcef06 100644 --- a/orka/src/orka/orka-rendering-debug-coordinate_axes.ads +++ b/orka/src/orka/orka-rendering-debug-coordinate_axes.ads @@ -42,8 +42,7 @@ package Orka.Rendering.Debug.Coordinate_Axes is Width, Height : Positive; Axis_Size : Transforms.Vector4 := [4.0, 100.0, 16.0, 32.0]; View, Proj : Transforms.Matrix4; - Transforms : Rendering.Buffers.Buffer) - with Pre => Transforms.Length > 0; + Transforms : Rendering.Buffers.Buffer); -- Render three coordinates axes for each transform -- -- The buffer Transforms, containing the transform matrices, must diff --git a/orka/src/orka/orka-rendering-debug-spheres.ads b/orka/src/orka/orka-rendering-debug-spheres.ads index 986e20ac..92e3c599 100644 --- a/orka/src/orka/orka-rendering-debug-spheres.ads +++ b/orka/src/orka/orka-rendering-debug-spheres.ads @@ -46,7 +46,7 @@ package Orka.Rendering.Debug.Spheres is (Object : in out Sphere; View, Proj : Transforms.Matrix4; Transforms, Spheres : Rendering.Buffers.Buffer) - with Pre => Transforms.Length > 0 and Spheres.Length in 2 | 2 * Transforms.Length; + with Pre => Spheres.Length in 2 | 2 * Transforms.Length; -- Set matrices and buffers to render a sphere for each transform -- -- The buffer Transforms, containing the transform matrices, must diff --git a/orka/src/orka/orka-rendering-shaders-modules.adb b/orka/src/orka/orka-rendering-shaders-modules.adb index 6c3c1b6a..372e733e 100644 --- a/orka/src/orka/orka-rendering-shaders-modules.adb +++ b/orka/src/orka/orka-rendering-shaders-modules.adb @@ -200,7 +200,6 @@ package body Orka.Rendering.Shaders.Modules is or else Parts (Index).Line /= Parts (Index + 1).Line or else Parts (Index).Column /= Parts (Index + 1).Column); end loop; - end Print_Log; procedure Load_And_Compile diff --git a/orka/src/orka/orka-rendering-shaders.adb b/orka/src/orka/orka-rendering-shaders.adb index d8a7e98a..c3f6cc17 100644 --- a/orka/src/orka/orka-rendering-shaders.adb +++ b/orka/src/orka/orka-rendering-shaders.adb @@ -45,7 +45,7 @@ package body Orka.Rendering.Shaders is function Create_Shader (Kind : Shader_Kind; Paths : String_Array) return Shader - is (Create_Shader (Modules.Shader_Module_Array'([for Path of Paths => Modules.Create_Module (Kind, Path.all)]))); + is (Create_Shader (Modules.Create_Modules (Kind, Paths))); function Create_Shader (Kind : Shader_Kind;