opengl: Work on texture tiling.
This commit is contained in:
@@ -198,15 +198,15 @@ is
|
||||
loop
|
||||
the_Vertices (Index_t (i)) := (Site => Vector_3 (the_Sites (i) & 0.0),
|
||||
Normal => Normal,
|
||||
Coords => (Coords_and_Centroid.Coords (Index_t (i)).S * Self.Face.texture_Details.texture_Tiling,
|
||||
Coords_and_Centroid.Coords (Index_t (i)).T * Self.Face.texture_Details.texture_Tiling),
|
||||
Coords => (Coords_and_Centroid.Coords (Index_t (i)).S * Self.Face.texture_Details.texture_Tiling.S,
|
||||
Coords_and_Centroid.Coords (Index_t (i)).T * Self.Face.texture_Details.texture_Tiling.T),
|
||||
Shine => default_Shine);
|
||||
end loop;
|
||||
|
||||
the_Vertices (the_Vertices'Last) := (Site => Vector_3 (Coords_and_Centroid.Centroid & 0.0),
|
||||
Normal => Normal,
|
||||
Coords => (S => 0.5 * Self.Face.texture_Details.texture_Tiling,
|
||||
T => 0.5 * Self.Face.texture_Details.texture_Tiling),
|
||||
Coords => (S => 0.5 * Self.Face.texture_Details.texture_Tiling.S,
|
||||
T => 0.5 * Self.Face.texture_Details.texture_Tiling.T),
|
||||
Shine => default_Shine);
|
||||
|
||||
face_Geometry := new_Geometry (Vertices => the_Vertices);
|
||||
|
||||
@@ -90,14 +90,21 @@ is
|
||||
--- Details
|
||||
--
|
||||
|
||||
type Tiling is -- The number of times the texture should be wrapped.
|
||||
record
|
||||
S : Real;
|
||||
T : Real;
|
||||
end record;
|
||||
|
||||
type Details is
|
||||
record
|
||||
Fades : fade_Levels (texture_Id) := [others => 0.0];
|
||||
Textures : asset_Names (1 .. Positive (texture_Id'Last)) := [others => null_Asset]; -- The textures to be applied to the visual.
|
||||
texture_Count : Natural := 0;
|
||||
texture_Tiling : Real := 1.0; -- The number of times the texture should be wrapped.
|
||||
texture_Applies : texture_Apply_array := [1 => True, others => False];
|
||||
Animation : Animation_view;
|
||||
Fades : fade_Levels (texture_Id) := [others => 0.0];
|
||||
Textures : asset_Names (1 .. Positive (texture_Id'Last)) := [others => null_Asset]; -- The textures to be applied to the visual.
|
||||
texture_Count : Natural := 0;
|
||||
texture_Tiling : Tiling := (S => 1.0,
|
||||
T => 1.0);
|
||||
texture_Applies : texture_Apply_array := [1 => True, others => False];
|
||||
Animation : Animation_view;
|
||||
end record;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user