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;
Face : in lit_textured.Face) return View
Face : in Face_t) return View
is
Self : constant View := new Item;
begin
@@ -30,6 +30,13 @@ is
--- Attributes ---
------------------
function Face (Self : in Item) return Face_t
is
begin
return Self.Face;
end Face;
------------
-- Texturing

View File

@@ -17,7 +17,7 @@ is
--- Face
--
type Face is
type Face_t is
record
texture_Details : texture_Set.Details;
end record;
@@ -28,13 +28,15 @@ is
--
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
--
function Face (Self : in Item) return Face_t;
overriding
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;
@@ -76,7 +78,7 @@ private
vertex_Sites : Vector_2_array (1 .. 8);
vertex_Count : Positive;
Face : lit_textured.Face;
Face : lit_textured.Face_t;
end record;

View File

@@ -93,7 +93,7 @@ is
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 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_Tiling : Real := 1.0; -- The number of times the texture should be wrapped.
texture_Applies : texture_Apply_array := [1 => True, others => False];