opengl.model: Add basic texturing subprograms.

This commit is contained in:
Rod Kay
2023-05-31 15:22:25 +10:00
parent ce41c9afef
commit 4861f54232
19 changed files with 547 additions and 32 deletions

View File

@@ -81,8 +81,9 @@ is
if Self.Faces (Front).texture_Name /= null_Asset
then
front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
front_Face.is_Transparent (now => front_Face.Texture.is_Transparent);
front_Face.Model_is (Self.all'unchecked_Access);
end if;
end;
@@ -102,6 +103,7 @@ is
then
rear_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent);
rear_Face.Model_is (Self.all'unchecked_Access);
end if;
end;
@@ -121,6 +123,7 @@ is
then
upper_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent);
upper_Face.Model_is (Self.all'unchecked_Access);
end if;
end;
@@ -140,6 +143,7 @@ is
then
lower_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent);
lower_Face.Model_is (Self.all'unchecked_Access);
end if;
end;
@@ -159,6 +163,7 @@ is
then
left_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
left_Face.is_Transparent (now => left_Face.Texture.is_Transparent);
left_Face.Model_is (Self.all'unchecked_Access);
end if;
end;
@@ -178,6 +183,7 @@ is
then
right_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
right_Face.is_Transparent (now => right_Face.Texture.is_Transparent);
right_Face.Model_is (Self.all'unchecked_Access);
end if;
end;
@@ -191,4 +197,46 @@ is
end to_GL_Geometries;
------------
-- Texturing
--
overriding
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
Now : in texture_Set.fade_Level)
is
begin
null;
end Fade_is;
overriding
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
is
begin
return 0.0;
end Fade;
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
Now : in openGL.asset_Name)
is
begin
null;
end Texture_is;
overriding
function texture_Count (Self : in Item) return Natural
is
begin
return 1;
end texture_Count;
end openGL.Model.box.textured;