opengl.model.polygon.lit_textured: Use model texturing mixin.

This commit is contained in:
Rod Kay
2025-09-07 06:27:46 +10:00
parent eb12d98f65
commit b766155987
6 changed files with 243 additions and 216 deletions

View File

@@ -1,6 +1,7 @@
with
openGL.texture_Set,
openGL.Texture;
openGL.Texture,
openGL.Model.texturing;
package openGL.Model.polygon.lit_textured
@@ -8,7 +9,9 @@ package openGL.Model.polygon.lit_textured
-- Models a lit and textured polygon.
--
is
type Item is new Model.item with private;
package textured_Model is new texturing.Mixin;
type Item is new textured_Model.item with private;
type View is access all Item'Class;
@@ -17,25 +20,30 @@ is
--- Face
--
type Face_t is
record
texture_Details : texture_Set.Details;
end record;
-- type Face_t is
-- record
-- texture_Details : texture_Set.Details;
-- end record;
---------
--- Forge
--
function new_Polygon (vertex_Sites : in Vector_2_array;
Face : in lit_textured.Face_t) return View;
-- function new_Polygon (vertex_Sites : in Vector_2_array;
-- Face : in lit_textured.Face_t) return View;
function new_Polygon (vertex_Sites : in Vector_2_array;
texture_Details : in texture_Set.Details) return View;
--------------
--- Attributes
--
function Face (Self : in Item) return Face_t;
-- function Face (Self : in Item) return Face_t;
-- overriding
-- function texture_Details (Self : in Item) return texture_Set.Details;
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
@@ -45,40 +53,40 @@ is
-- Texturing
--
overriding
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
overriding
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
Now : in texture_Set.fade_Level);
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
Now : in asset_Name);
overriding
function texture_Count (Self : in Item) return Natural;
overriding
function texture_Applied (Self : in Item; Which : in texture_Set.texture_Id) return Boolean;
overriding
procedure texture_Applied_is (Self : in out Item; Which : in texture_Set.texture_Id;
Now : in Boolean);
overriding
procedure animate (Self : in out Item);
-- overriding
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
--
-- overriding
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
-- Now : in texture_Set.fade_Level);
--
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
-- Now : in asset_Name);
--
-- overriding
-- function texture_Count (Self : in Item) return Natural;
--
--
-- overriding
-- function texture_Applied (Self : in Item; Which : in texture_Set.texture_Id) return Boolean;
--
-- overriding
-- procedure texture_Applied_is (Self : in out Item; Which : in texture_Set.texture_Id;
-- Now : in Boolean);
--
-- overriding
-- procedure animate (Self : in out Item);
private
type Item is new Model.polygon.item with
type Item is new textured_Model.item with
record
vertex_Sites : Vector_2_array (1 .. 8);
vertex_Count : Positive;
Face : lit_textured.Face_t;
-- Face : lit_textured.Face_t;
end record;