From 8435439b7243d3dc9e52858f0234205df4dec9e1 Mon Sep 17 00:00:00 2001 From: Rod Kay Date: Fri, 16 May 2025 19:53:56 +1000 Subject: [PATCH] opengl.model.polygon.lit_textured: Add 'Face' function. --- .../lean/model/opengl-model-polygon-lit_textured.adb | 9 ++++++++- .../lean/model/opengl-model-polygon-lit_textured.ads | 8 +++++--- 3-mid/opengl/source/lean/opengl-texture_set.ads | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.adb index 4c435c9..f951d87 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.adb @@ -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 diff --git a/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.ads index b003425..4f85c29 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-polygon-lit_textured.ads @@ -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; diff --git a/3-mid/opengl/source/lean/opengl-texture_set.ads b/3-mid/opengl/source/lean/opengl-texture_set.ads index d0ff991..1f26517 100644 --- a/3-mid/opengl/source/lean/opengl-texture_set.ads +++ b/3-mid/opengl/source/lean/opengl-texture_set.ads @@ -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];