opengl.model.polygon.lit_textured: Add 'Face' function.

This commit is contained in:
Rod Kay
2025-05-16 19:53:56 +10:00
parent ad4d1229d5
commit 8435439b72
3 changed files with 14 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ is
-- --
function new_polygon (vertex_Sites : in Vector_2_array; function new_polygon (vertex_Sites : in Vector_2_array;
Face : in lit_textured.Face) return View Face : in Face_t) return View
is is
Self : constant View := new Item; Self : constant View := new Item;
begin begin
@@ -30,6 +30,13 @@ is
--- Attributes --- --- Attributes ---
------------------ ------------------
function Face (Self : in Item) return Face_t
is
begin
return Self.Face;
end Face;
------------ ------------
-- Texturing -- Texturing

View File

@@ -17,7 +17,7 @@ is
--- Face --- Face
-- --
type Face is type Face_t is
record record
texture_Details : texture_Set.Details; texture_Details : texture_Set.Details;
end record; end record;
@@ -28,13 +28,15 @@ is
-- --
function new_Polygon (vertex_Sites : in Vector_2_array; function new_Polygon (vertex_Sites : in Vector_2_array;
Face : in lit_textured.Face) return View; Face : in lit_textured.Face_t) return View;
-------------- --------------
--- Attributes --- Attributes
-- --
function Face (Self : in Item) return Face_t;
overriding overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views; Fonts : in Font.font_id_Map_of_font) return Geometry.views;
@@ -76,7 +78,7 @@ private
vertex_Sites : Vector_2_array (1 .. 8); vertex_Sites : Vector_2_array (1 .. 8);
vertex_Count : Positive; vertex_Count : Positive;
Face : lit_textured.Face; Face : lit_textured.Face_t;
end record; end record;

View File

@@ -93,7 +93,7 @@ is
type Details is type Details is
record record
Fades : fade_Levels (texture_Id) := [others => 0.0]; 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 hex. Textures : asset_Names (1 .. Positive (texture_Id'Last)) := [others => null_Asset]; -- The textures to be applied to the visual.
texture_Count : Natural := 0; texture_Count : Natural := 0;
texture_Tiling : Real := 1.0; -- The number of times the texture should be wrapped. texture_Tiling : Real := 1.0; -- The number of times the texture should be wrapped.
texture_Applies : texture_Apply_array := [1 => True, others => False]; texture_Applies : texture_Apply_array := [1 => True, others => False];