opengl.texture: Add simple tiling.
This commit is contained in:
@@ -161,13 +161,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)),
|
||||
Coords => (Coords_and_Centroid.Coords (Index_t (i)).S * Self.Face.texture_Tiling,
|
||||
Coords_and_Centroid.Coords (Index_t (i)).T * Self.Face.texture_Tiling),
|
||||
Shine => default_Shine);
|
||||
end loop;
|
||||
|
||||
the_Vertices (the_Vertices'Last) := (Site => Vector_3 (Coords_and_Centroid.Centroid & 0.0),
|
||||
Normal => Normal,
|
||||
Coords => (0.5, 0.5),
|
||||
Coords => (S => 0.5 * Self.Face.texture_Tiling,
|
||||
T => 0.5 * Self.Face.texture_Tiling),
|
||||
Shine => default_Shine);
|
||||
|
||||
upper_Face := new_Face (Vertices => the_Vertices);
|
||||
|
||||
@@ -14,9 +14,10 @@ is
|
||||
|
||||
type Face is
|
||||
record
|
||||
Fades : texture_Set.fade_Levels (texture_Set.texture_Id) := [others => 0.0];
|
||||
Textures : openGL.asset_Names (1 .. Positive (texture_Set.texture_Id'Last)) := [others => null_Asset]; -- The textures to be applied to the hex.
|
||||
texture_Count : Natural := 0;
|
||||
Fades : texture_Set.fade_Levels (texture_Set.texture_Id) := [others => 0.0];
|
||||
Textures : openGL.asset_Names (1 .. Positive (texture_Set.texture_Id'Last)) := [others => null_Asset]; -- The textures to be applied to the hex.
|
||||
texture_Count : Natural := 0;
|
||||
texture_Tiling : openGL.Real := 1.0; -- The number of times the texture should be wrapped.
|
||||
end record;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user