opengl.model: Add basic texturing subprograms.
This commit is contained in:
@@ -74,8 +74,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;
|
||||
|
||||
@@ -93,8 +94,9 @@ is
|
||||
|
||||
if Self.Faces (Rear).texture_Name /= null_Asset
|
||||
then
|
||||
rear_Face.Texture_is (Textures.fetch (Self.Faces (Rear).texture_Name));
|
||||
rear_Face.Texture_is (Textures.fetch (Self.Faces (Rear).texture_Name));
|
||||
rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent);
|
||||
rear_Face.Model_is (Self.all'unchecked_Access);
|
||||
end if;
|
||||
end;
|
||||
|
||||
@@ -112,8 +114,9 @@ is
|
||||
|
||||
if Self.Faces (Upper).texture_Name /= null_Asset
|
||||
then
|
||||
upper_Face.Texture_is (Textures.fetch (Self.Faces (Upper).texture_Name));
|
||||
upper_Face.Texture_is (Textures.fetch (Self.Faces (Upper).texture_Name));
|
||||
upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent);
|
||||
upper_Face.Model_is (Self.all'unchecked_Access);
|
||||
end if;
|
||||
end;
|
||||
|
||||
@@ -133,6 +136,7 @@ is
|
||||
then
|
||||
lower_Face.Texture_is (Textures.fetch (Self.Faces (Lower).texture_Name));
|
||||
lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent);
|
||||
lower_Face.Model_is (Self.all'unchecked_Access);
|
||||
end if;
|
||||
end;
|
||||
|
||||
@@ -150,8 +154,9 @@ is
|
||||
|
||||
if Self.Faces (Left).texture_Name /= null_Asset
|
||||
then
|
||||
left_Face.Texture_is (Textures.fetch (Self.Faces (Left).texture_Name));
|
||||
left_Face.Texture_is (Textures.fetch (Self.Faces (Left).texture_Name));
|
||||
left_Face.is_Transparent (now => left_Face.Texture.is_Transparent);
|
||||
left_Face.Model_is (Self.all'unchecked_Access);
|
||||
end if;
|
||||
end;
|
||||
|
||||
@@ -169,8 +174,9 @@ is
|
||||
|
||||
if Self.Faces (Right).texture_Name /= null_Asset
|
||||
then
|
||||
right_Face.Texture_is (Textures.fetch (Self.Faces (Right).texture_Name));
|
||||
right_Face.Texture_is (Textures.fetch (Self.Faces (Right).texture_Name));
|
||||
right_Face.is_Transparent (now => right_Face.Texture.is_Transparent);
|
||||
right_Face.Model_is (Self.all'unchecked_Access);
|
||||
end if;
|
||||
end;
|
||||
|
||||
@@ -184,4 +190,48 @@ 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.lit_textured;
|
||||
|
||||
Reference in New Issue
Block a user