Work on texturing and animation.

This commit is contained in:
Rod Kay
2025-04-09 00:19:38 +10:00
parent 1612ddf208
commit 0e3e3c1d3d
7 changed files with 141 additions and 68 deletions

View File

@@ -39,7 +39,7 @@ is
Now : in texture_Set.fade_Level)
is
begin
Self.Face.Fades (which) := Now;
Self.Face.texture_Details.Fades (which) := Now;
end Fade_is;
@@ -48,7 +48,7 @@ is
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
is
begin
return Self.Face.Fades (which);
return Self.Face.texture_Details.Fades (which);
end Fade;
@@ -57,7 +57,7 @@ is
Now : in openGL.asset_Name)
is
begin
Self.Face.Textures (Positive (which)) := Now;
Self.Face.texture_Details.Textures (Positive (which)) := Now;
end Texture_is;
@@ -67,7 +67,7 @@ is
function texture_Count (Self : in Item) return Natural
is
begin
return Self.Face.texture_Count;
return Self.Face.texture_Details.texture_Count;
end texture_Count;
@@ -76,7 +76,7 @@ is
function texture_Applied (Self : in Item; Which : in texture_Set.texture_Id) return Boolean
is
begin
return Self.Face.texture_Applies (Which);
return Self.Face.texture_Details.texture_Applies (Which);
end texture_Applied;
@@ -86,7 +86,7 @@ is
Now : in Boolean)
is
begin
Self.Face.texture_Applies (Which) := Now;
Self.Face.texture_Details.texture_Applies (Which) := Now;
end texture_Applied_is;
@@ -96,13 +96,13 @@ is
is
use type texture_Set.Animation_view;
begin
if Self.Face.Animation = null
if Self.Face.texture_Details.Animation = null
then
return;
end if;
texture_Set.animate (Self.Face.Animation.all,
Self.Face.texture_Applies);
texture_Set.animate (Self.Face.texture_Details.Animation.all,
Self.Face.texture_Details.texture_Applies);
end animate;
@@ -142,7 +142,7 @@ is
Self.Sides);
function new_Face (Vertices : in geometry.lit_textured.Vertex_array) return Geometry.lit_textured.view
function new_Geometry (Vertices : in geometry.lit_textured.Vertex_array) return Geometry.lit_textured.view
is
use Primitive,
texture_Set;
@@ -158,15 +158,15 @@ is
the_Geometry.Vertices_are (Vertices);
the_Geometry.add (Primitive.view (the_Primitive));
for i in 1 .. Self.Face.texture_Count
for i in 1 .. Self.Face.texture_Details.texture_Count
loop
Id := texture_Id (i);
the_Geometry.Fade_is (which => Id,
now => Self.Face.Fades (Id));
now => Self.Face.texture_Details.Fades (Id));
the_Geometry.Texture_is (which => Id,
now => Textures.fetch (Self.Face.Textures (i)));
now => Textures.fetch (Self.Face.texture_Details.Textures (i)));
the_Geometry.is_Transparent (now => the_Geometry.Texture.is_Transparent);
end loop;
@@ -174,13 +174,13 @@ is
the_Geometry.Model_is (Self.all'unchecked_Access);
return the_Geometry;
end new_Face;
end new_Geometry;
upper_Face : Geometry.lit_textured.view;
face_Geometry : Geometry.lit_textured.view;
begin
-- Upper Face
-- Geometry.
--
declare
use Texture.Coordinates;
@@ -194,7 +194,7 @@ is
Normal => Normal,
Coords => (0.50, 0.50),
Shine => default_Shine);
-- Circumference
-- Circumference.
--
for i in 2 .. the_Vertices'Last
loop
@@ -204,10 +204,10 @@ is
Shine => default_Shine);
end loop;
upper_Face := new_Face (Vertices => the_Vertices);
face_Geometry := new_Geometry (Vertices => the_Vertices);
end;
return [1 => upper_Face.all'Access];
return [1 => face_Geometry.all'Access];
end to_GL_Geometries;