opengl.model: Show model tag in exception message for texturing.

This commit is contained in:
Rod Kay
2025-09-07 03:52:02 +10:00
parent fdebe21c71
commit 92388f065e

View File

@@ -1,5 +1,6 @@
with with
ada.unchecked_Deallocation; ada.unchecked_Deallocation,
ada.Tags;
package body openGL.Model package body openGL.Model
@@ -218,11 +219,14 @@ is
-- Texturing -- Texturing
-- --
use ada.Tags;
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id; procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
Now : in texture_Set.fade_Level) Now : in texture_Set.fade_Level)
is is
begin begin
raise program_Error with "Model does not support texturing."; raise program_Error with External_Tag (Model.item'Class (Self)'Tag) & " Model does not support texturing.";
end Fade_is; end Fade_is;
@@ -230,7 +234,7 @@ is
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
is is
begin begin
raise program_Error with "Model does not support texturing."; raise program_Error with External_Tag (Model.item'Class (Self)'Tag) & " Model does not support texturing.";
return 0.0; return 0.0;
end Fade; end Fade;
@@ -239,7 +243,7 @@ is
function texture_Count (Self : in Item) return Natural function texture_Count (Self : in Item) return Natural
is is
begin begin
raise program_Error with "Model does not support texturing."; raise program_Error with External_Tag (Model.item'Class (Self)'Tag) & " Model does not support texturing.";
return 0; return 0;
end texture_Count; end texture_Count;
@@ -248,7 +252,7 @@ is
function texture_Applied (Self : in Item; Which : in texture_Set.texture_Id) return Boolean function texture_Applied (Self : in Item; Which : in texture_Set.texture_Id) return Boolean
is is
begin begin
raise program_Error with "Model does not support texturing."; raise program_Error with External_Tag (Model.item'Class (Self)'Tag) & " Model does not support texturing.";
return False; return False;
end texture_Applied; end texture_Applied;
@@ -258,7 +262,7 @@ is
Now : in Boolean) Now : in Boolean)
is is
begin begin
raise program_Error with "Model does not support texturing."; raise program_Error with External_Tag (Model.item'Class (Self)'Tag) & " Model does not support texturing.";
end texture_applied_is; end texture_applied_is;