Skip to content

Commit

Permalink
orka: Remove part of some pre conditions which can never be false
Browse files Browse the repository at this point in the history
  • Loading branch information
onox committed May 26, 2024
1 parent 173b277 commit 7955fda
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions orka/src/orka/orka-rendering-debug-coordinate_axes.ads
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion orka/src/orka/orka-rendering-debug-spheres.ads
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion orka/src/orka/orka-rendering-shaders-modules.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion orka/src/orka/orka-rendering-shaders.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7955fda

Please sign in to comment.