diff --git a/3-mid/opengl/applet/demo/lights/render_lighting/launch_render_lighting.adb b/3-mid/opengl/applet/demo/lights/render_lighting/launch_render_lighting.adb index 8327d6b..08c888f 100644 --- a/3-mid/opengl/applet/demo/lights/render_lighting/launch_render_lighting.adb +++ b/3-mid/opengl/applet/demo/lights/render_lighting/launch_render_lighting.adb @@ -31,7 +31,7 @@ begin -- the_Ball_1_Model : constant Model.Sphere.lit_colored_textured.view := openGL.Model.Sphere.lit_colored_textured.new_Sphere (Radius => 1.0, - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture]), Image => the_Texture); the_Ball_2_Model : constant Model.Sphere.lit_colored.view := openGL.Model.Sphere.lit_colored.new_Sphere (Radius => 1.0, diff --git a/3-mid/opengl/applet/demo/models/render_billboards/launch_render_billboards.adb b/3-mid/opengl/applet/demo/models/render_billboards/launch_render_billboards.adb index 73a6513..8043ce6 100644 --- a/3-mid/opengl/applet/demo/models/render_billboards/launch_render_billboards.adb +++ b/3-mid/opengl/applet/demo/models/render_billboards/launch_render_billboards.adb @@ -29,14 +29,14 @@ begin := Model.Billboard.textured.forge.new_Billboard (--Scale => (1.0, 1.0, 1.0), Plane => Billboard.xy, Texture => the_Texture, - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture])); + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture])); the_colored_Billboard_Model : constant Model.Billboard.colored_textured.view := Model.Billboard.colored_textured.new_Billboard (--Scale => (1.0, 1.0, 1.0), Plane => Billboard.xy, Color => (Palette.Green, Opaque), Texture => the_Texture, - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture])); + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture])); -- The Sprites. -- use openGL.Visual.Forge; diff --git a/3-mid/opengl/applet/demo/models/render_boxes/launch_render_boxes.adb b/3-mid/opengl/applet/demo/models/render_boxes/launch_render_boxes.adb index e7d4771..6e740d4 100644 --- a/3-mid/opengl/applet/demo/models/render_boxes/launch_render_boxes.adb +++ b/3-mid/opengl/applet/demo/models/render_boxes/launch_render_boxes.adb @@ -61,7 +61,7 @@ begin Lower => (texture_Name => the_Texture), Left => (texture_Name => the_Texture), Right => (texture_Name => the_Texture)], - texture_Details => texture_Set.to_Details ([1 => the_Texture])); + texture_Details => texture_Set.to_Set ([1 => the_Texture])); -- The Visuals. -- diff --git a/3-mid/opengl/applet/demo/renderer/render_text/launch_render_text.adb b/3-mid/opengl/applet/demo/renderer/render_text/launch_render_text.adb index 18f065a..e4d006f 100644 --- a/3-mid/opengl/applet/demo/renderer/render_text/launch_render_text.adb +++ b/3-mid/opengl/applet/demo/renderer/render_text/launch_render_text.adb @@ -37,7 +37,7 @@ begin := Model.Text.lit_colored.new_Text (Text => "Howdy", Font => the_font_Id, Color => (Red, Opaque), - texture_Details => openGL.texture_Set.to_Details ([1 => openGL.to_Asset ("assets/texture/Face1.bmp")]), + texture_Details => openGL.texture_Set.to_Set ([1 => openGL.to_Asset ("assets/texture/Face1.bmp")]), Centered => False); -- The sprites. diff --git a/3-mid/opengl/applet/demo/two_cameras/launch_two_cameras_demo.adb b/3-mid/opengl/applet/demo/two_cameras/launch_two_cameras_demo.adb index 7e9daae..682fb6c 100644 --- a/3-mid/opengl/applet/demo/two_cameras/launch_two_cameras_demo.adb +++ b/3-mid/opengl/applet/demo/two_cameras/launch_two_cameras_demo.adb @@ -56,7 +56,7 @@ begin the_ball_Model : constant Model.Sphere.lit_colored_textured.view := Model.Sphere.lit_colored_textured.new_Sphere (radius => 0.5, - texture_Details => texture_Set.to_Details ([1 => the_Face])); + texture_Details => texture_Set.to_Set ([1 => the_Face])); -- The Sprites. -- diff --git a/3-mid/opengl/source/demo/opengl-demo.adb b/3-mid/opengl/source/demo/opengl-demo.adb index 0c58893..ed43359 100644 --- a/3-mid/opengl/source/demo/opengl-demo.adb +++ b/3-mid/opengl/source/demo/opengl-demo.adb @@ -152,25 +152,25 @@ is the_ball_3_Model : constant Model.sphere.lit_textured.view := Model.sphere.lit_textured.new_Sphere (Radius => 1.0, - texture_Details => texture_Set.to_Details ([1 => the_Texture]), + texture_Details => texture_Set.to_Set ([1 => the_Texture]), Image => the_Texture); the_ball_4_Model : constant Model.sphere.lit_colored_textured.view := Model.sphere.lit_colored_textured.new_Sphere (Radius => 1.0, - texture_Details => texture_Set.to_Details ([1 => the_Texture]), + texture_Details => texture_Set.to_Set ([1 => the_Texture]), Image => the_Texture); the_billboard_Model : constant Model.billboard.textured.view := Model.billboard.textured.forge.new_Billboard (Size => (1.0, 1.0), Plane => Billboard.xy, - texture_Details => texture_Set.to_Details ([1 => the_Texture]), + texture_Details => texture_Set.to_Set ([1 => the_Texture]), Texture => the_Texture); the_colored_billboard_Model : constant Model.billboard.textured.view -- TODO: Add color. := Model.billboard.textured.forge.new_Billboard (Size => (1.0, 1.0), Plane => Billboard.xy, Texture => the_Texture, - texture_Details => texture_Set.to_Details ([1 => the_Texture])); + texture_Details => texture_Set.to_Set ([1 => the_Texture])); use Model.box; the_box_1_Model : constant Model.box.colored.view @@ -187,24 +187,24 @@ is := Model.box.lit_textured.new_Box (Size => [1.0, 2.0, 1.0], Faces => [others => (texture_Name => the_Texture)], - texture_Details => texture_Set.to_Details ([1 => the_Texture])); + texture_Details => texture_Set.to_Set ([1 => the_Texture])); the_box_3_Model : constant Model.box.textured.view := Model.box.textured.new_Box (Size => [1.0, 2.0, 3.0], Faces => [others => (texture_Name => the_Texture)], - texture_Details => texture_Set.to_Details ([1 => the_Texture])); + texture_Details => texture_Set.to_Set ([1 => the_Texture])); the_capsule_Model : constant Model.capsule.lit_textured.view := Model.capsule.lit_textured.new_Capsule (Radius => 0.5, Height => 2.0, - texture_Details => texture_Set.to_Details ([1 => the_Texture]), + texture_Details => texture_Set.to_Set ([1 => the_Texture]), Image => the_Texture); the_lit_textured_circle_Model : constant Model.circle.lit_textured.view := Model.circle.lit_textured.new_Circle (Radius => 1.5, - Texture_Details => (openGL.texture_Set.to_Details ([1 => the_Texture])), + Texture_Details => (openGL.texture_Set.to_Set ([1 => the_Texture])), Sides => 24); the_grid_Model : constant Model.grid.view @@ -219,7 +219,7 @@ is the_textured_hexagon_Model : constant Model.hexagon.lit_textured.view := Model.hexagon.lit_textured.new_Hexagon (Radius => 0.5, - texture_Details => texture_Set.to_Details ([1 => the_Texture])); + texture_Details => texture_Set.to_Set ([1 => the_Texture])); the_faceted_hexagon_column_Model : constant Model.hexagon_Column.lit_colored_faceted.view := Model.hexagon_Column.lit_colored_faceted.new_hexagon_Column @@ -254,7 +254,7 @@ is := Model.any.new_Model (--Scale => (1.0, 1.0, 1.0), Model => to_Asset ("assets/opengl/model/human.obj"), Texture => the_Texture, - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture]), Texture_is_lucid => False); the_lit_colored_polygon_Model : constant Model.polygon.lit_colored.view @@ -263,13 +263,13 @@ is the_lit_textured_polygon_Model : constant Model.polygon.lit_textured.view := Model.polygon.lit_textured.new_Polygon (vertex_Sites => [Origin_2D, [1.0, 0.0], [1.0, 1.0], [-1.0, 0.5]], - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture])); + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture])); the_text_Model : constant Model.Text.lit_colored.view := Model.Text.lit_colored.new_Text (Text => "Once upon a midnight dreary ...", Font => the_font_Id, Color => (Green, Opaque), - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture]), Centered => True); the_segment_line_Model : constant Model.segment_line.view @@ -290,7 +290,7 @@ is Col => 1, Heights => the_Region.all'Access, Color_Map => texture_File, - texture_Details => openGL.texture_Set.to_Details ([1 => texture_File]), + texture_Details => openGL.texture_Set.to_Set ([1 => texture_File]), Tiling => Tiling); begin Demo.Renderer.add_Font (the_font_Id); diff --git a/3-mid/opengl/source/lean/model/opengl-model-any.adb b/3-mid/opengl/source/lean/model/opengl-model-any.adb index ea219b4..bd437fc 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-any.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-any.adb @@ -31,7 +31,7 @@ is function to_Model (Model : in asset_Name; Texture : in asset_Name; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Texture_is_lucid : in Boolean) return openGL.Model.any.item is begin @@ -50,7 +50,7 @@ is function new_Model (Model : in asset_Name; Texture : in asset_Name; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Texture_is_lucid : in Boolean) return openGL.Model.any.view is begin diff --git a/3-mid/opengl/source/lean/model/opengl-model-any.ads b/3-mid/opengl/source/lean/model/opengl-model-any.ads index be60a60..557de1e 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-any.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-any.ads @@ -24,7 +24,7 @@ is function new_Model (Model : in asset_Name; Texture : in asset_Name; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Texture_is_lucid : in Boolean) return openGL.Model.any.view; -------------- diff --git a/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.adb index 0464488..f29bb60 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.adb @@ -15,7 +15,7 @@ is Plane : in billboard.Plane; Color : in lucid_Color; Texture : in asset_Name; - texture_Details : in texture_Set.Details) return View + texture_Details : in texture_Set.item) return View is Self : constant View := new Item; begin diff --git a/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads index 07ee790..9dc5eb9 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-billboard-colored_textured.ads @@ -25,7 +25,7 @@ is Plane : in billboard.Plane; Color : in lucid_Color; Texture : in asset_Name; - texture_Details : in texture_Set.Details) return View; + texture_Details : in texture_Set.item) return View; -------------- --- Attributes diff --git a/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.adb b/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.adb index fa48ff8..a22a6ee 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.adb @@ -17,7 +17,7 @@ is function new_Billboard (Size : in Size_t := default_Size; Plane : in billboard.Plane; Texture : in asset_Name; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Lucid : in Boolean := False) return View is Self : constant View := new Item (Lucid); diff --git a/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.ads b/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.ads index 82793cf..069b178 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-billboard-textured.ads @@ -27,7 +27,7 @@ is function new_Billboard (Size : in Size_t := default_Size; Plane : in billboard.Plane; Texture : in asset_Name; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Lucid : in Boolean := False) return View; end Forge; diff --git a/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.adb index 130e5be..13a1815 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.adb @@ -11,7 +11,7 @@ is function new_Box (Size : in Vector_3; Faces : in lit_textured.Faces; - texture_Details : in texture_Set.Details := texture_Set.no_Details) return View + texture_Details : in texture_Set.item := texture_Set.null_Set) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.ads index 9208579..5d1b2ce 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-box-lit_textured.ads @@ -32,7 +32,7 @@ is function new_Box (Size : in Vector_3; Faces : in lit_textured.Faces; - texture_Details : in texture_Set.Details := texture_Set.no_Details) return View; + texture_Details : in texture_Set.item := texture_Set.null_Set) return View; -------------- diff --git a/3-mid/opengl/source/lean/model/opengl-model-box-textured.adb b/3-mid/opengl/source/lean/model/opengl-model-box-textured.adb index ebb3a32..adf8763 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-box-textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-box-textured.adb @@ -11,7 +11,7 @@ is function new_Box (Size : in Vector_3; Faces : in textured.Faces; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; is_Skybox : in Boolean := False) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-box-textured.ads b/3-mid/opengl/source/lean/model/opengl-model-box-textured.ads index 6cde3ba..060c1aa 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-box-textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-box-textured.ads @@ -32,7 +32,7 @@ is function new_Box (Size : in Vector_3; Faces : in textured.Faces; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; is_Skybox : in Boolean := False) return View; diff --git a/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.adb index 5a3b1af..720c345 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.adb @@ -13,7 +13,7 @@ is function new_Capsule (Radius : in Real; Height : in Real; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.ads index 79a7e1f..4768816 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-capsule-lit_textured.ads @@ -20,7 +20,7 @@ is function new_Capsule (Radius : in Real; Height : in Real; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View; -------------- diff --git a/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.adb b/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.adb index e42e934..5e64692 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.adb @@ -13,7 +13,7 @@ is function new_Capsule (Radius : in Real; Height : in Real; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.ads b/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.ads index d053847..db9c372 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-capsule-textured.ads @@ -19,7 +19,7 @@ is function new_Capsule (Radius : in Real; Height : in Real; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View; -------------- diff --git a/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.adb index 880ccc8..10bbdf9 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.adb @@ -13,7 +13,7 @@ is -- function new_circle (Radius : in Real; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Sides : in Positive := 24) return View is Self : constant View := new Item; @@ -84,7 +84,7 @@ is the_Geometry.Vertices_are (Vertices); the_Geometry.add (Primitive.view (the_Primitive)); - for i in 1 .. Self.texture_Details.texture_Count + for i in 1 .. Self.texture_Details.Count loop put_Line ("KKK" & Self.texture_Details'Image); @@ -94,9 +94,9 @@ is -- the_Geometry.Fade_is (which => Id, -- now => Self.texture_Details.Fades (Id)); - the_Geometry.Texture_is (which => Id, - now => Textures.fetch (Self.texture_Details.Textures (i))); - the_Geometry.is_Transparent (now => the_Geometry.Texture.is_Transparent); + the_Geometry.Texture_is (Which => Id, + Now => Textures.fetch (Self.texture_Details.Details (i).Texture)); + the_Geometry.is_Transparent (Now => the_Geometry.Texture.is_Transparent); end loop; the_Geometry.is_Transparent (True); -- TODO: Do transparency properly. diff --git a/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.ads index 00e3f73..15649ef 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-circle-lit_textured.ads @@ -20,7 +20,7 @@ is -- function new_circle (Radius : in Real; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Sides : in Positive := 24) return View; diff --git a/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.adb index 410cd30..9d54a03 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.adb @@ -10,7 +10,7 @@ is -- function new_Hexagon (Radius : in Real; - texture_Details : in texture_Set.Details) return View + texture_Details : in texture_Set.item) return View is Self : constant View := new Item; begin @@ -64,7 +64,7 @@ is the_Geometry.Vertices_are (Vertices); the_Geometry.add (Primitive.view (the_Primitive)); - for i in 1 .. Self.texture_Details.texture_Count + for i in 1 .. Self.texture_Details.Count loop Id := texture_Id (i); @@ -72,7 +72,7 @@ is -- Now => Self.texture_Details.Fades (Id)); the_Geometry.Texture_is (Which => Id, - Now => Textures.fetch (Self.texture_Details.Textures (i))); + Now => Textures.fetch (Self.texture_Details.Details (i).Texture)); the_Geometry.is_Transparent (Now => the_Geometry.Texture.is_Transparent); end loop; diff --git a/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.ads index 3dacb82..060524e 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_textured.ads @@ -20,7 +20,7 @@ is -- function new_Hexagon (Radius : in Real; - texture_Details : in texture_Set.Details) return View; + texture_Details : in texture_Set.item) return View; -------------- 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 20a6204..b505186 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; - texture_Details : in texture_Set.Details) return View + texture_Details : in texture_Set.item) return View is Self : constant View := new Item; begin @@ -74,7 +74,7 @@ is the_Geometry.Vertices_are (Vertices); the_Geometry.add (Primitive.view (the_Primitive)); - for i in 1 .. Self.texture_Details.texture_Count + for i in 1 .. Self.texture_Details.Count loop Id := texture_Id (i); @@ -82,7 +82,7 @@ is -- Now => Self.texture_Details.Fades (Id)); the_Geometry.Texture_is (Which => Id, - Now => Textures.fetch (Self.texture_Details.Textures (i))); + Now => Textures.fetch (Self.texture_Details.Details (i).Texture)); the_Geometry.is_Transparent (Now => the_Geometry.Texture.is_Transparent); end loop; 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 112a9fe..1b3fdd6 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 @@ -20,7 +20,7 @@ is -- function new_Polygon (vertex_Sites : in Vector_2_array; - texture_Details : in texture_Set.Details) return View; + texture_Details : in texture_Set.item) return View; -------------- --- Attributes diff --git a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.adb index 850321a..880508f 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.adb @@ -15,7 +15,7 @@ is long_Count : in Positive := default_longitude_Count; Color : in openGL.lucid_Color := (openGL.Palette.Grey, Opacity => 1.0); - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.ads index 5b7a8c6..f3a6e5f 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_colored_textured.ads @@ -21,7 +21,7 @@ is long_Count : in Positive := default_longitude_Count; Color : in openGL.lucid_Color := (openGL.Palette.Grey, Opacity => 1.0); - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View; diff --git a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.adb b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.adb index c5c4db1..1fc370e 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.adb @@ -12,7 +12,7 @@ is function new_Sphere (Radius : in Real; lat_Count : in Positive := default_latitude_Count; long_Count : in Positive := default_longitude_Count; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.ads b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.ads index 400df84..1836e33 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-sphere-lit_textured.ads @@ -20,7 +20,7 @@ is function new_Sphere (Radius : in Real; lat_Count : in Positive := default_latitude_Count; long_Count : in Positive := default_longitude_Count; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Image : in asset_Name := null_Asset) return View; diff --git a/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.adb b/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.adb index 5cf4854..a8b4ff9 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.adb @@ -15,7 +15,7 @@ is lat_Count : in Positive := 26; long_Count : in Positive := 52; Image : in asset_Name := null_Asset; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; is_Skysphere : in Boolean := False) return View is Self : constant View := new Item; diff --git a/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.ads b/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.ads index 753f0d3..b0486d5 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-sphere-textured.ads @@ -23,7 +23,7 @@ is lat_Count : in Positive := 26; long_Count : in Positive := 52; Image : in asset_Name := null_Asset; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; is_Skysphere : in Boolean := False) return View; -------------- diff --git a/3-mid/opengl/source/lean/model/opengl-model-terrain.adb b/3-mid/opengl/source/lean/model/opengl-model-terrain.adb index 0db9530..ac2f2be 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-terrain.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-terrain.adb @@ -19,7 +19,7 @@ is Row, Col : in Integer; Heights : in height_Map_view; color_Map : in asset_Name; - texture_Details : in texture_Set.Details := texture_Set.no_Details; + texture_Details : in texture_Set.item := texture_Set.null_Set; Tiling : in texture_Transform_2d := (S => (0.0, 1.0), T => (0.0, 1.0))) return View is diff --git a/3-mid/opengl/source/lean/model/opengl-model-terrain.ads b/3-mid/opengl/source/lean/model/opengl-model-terrain.ads index 7df9803..24fe16c 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-terrain.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-terrain.ads @@ -26,7 +26,7 @@ is Row, Col : in Integer; Heights : in height_Map_view; color_Map : in asset_Name; - texture_Details : in texture_Set.Details := texture_Set.no_Details; + texture_Details : in texture_Set.item := texture_Set.null_Set; Tiling : in texture_Transform_2d := (S => (0.0, 1.0), T => (0.0, 1.0))) return View; overriding diff --git a/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.adb b/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.adb index 28854ef..bdeddd2 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.adb @@ -16,7 +16,7 @@ is function new_Text (Text : in String; Font : in openGL.Font.font_Id; Color : in lucid_Color; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Centered : in Boolean := True) return View is Font_Name : constant String := to_String (Font.Name); diff --git a/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.ads b/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.ads index 0d876a1..9f626f7 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-text-lit_colored.ads @@ -23,7 +23,7 @@ is function new_Text (Text : in String; Font : in openGL.Font.font_Id; Color : in lucid_Color; - texture_Details : in texture_Set.Details; + texture_Details : in texture_Set.item; Centered : in Boolean := True) return View; diff --git a/3-mid/opengl/source/lean/model/opengl-model-texturing.adb b/3-mid/opengl/source/lean/model/opengl-model-texturing.adb index 9886fa5..7e4de0d 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-texturing.adb +++ b/3-mid/opengl/source/lean/model/opengl-model-texturing.adb @@ -7,13 +7,15 @@ is package body Mixin is + use openGL.texture_Set; + overriding procedure texture_Object_is (Self : in out textured_Item; Which : in texture_Set.texture_Id; Now : in openGL.texture.Object) is begin - Self.texture_Details.Objects (Integer (Which)) := Now; + Self.texture_Set.Details (detail_Count (Which)).Object := Now; end texture_Object_is; @@ -22,7 +24,7 @@ is function texture_Object (Self : in textured_Item; Which : in texture_Set.texture_Id) return openGL.texture.Object is begin - return Self.texture_Details.Objects (Integer (Which)); + return Self.texture_Set.Details (detail_Count (Which)).Object; end texture_Object; @@ -33,7 +35,7 @@ is Now : in texture_Set.fade_Level) is begin - Self.texture_Details.Fades (Which) := Now; + Self.texture_Set.Details (detail_Count (Which)).Fade := Now; end Fade_is; @@ -42,7 +44,7 @@ is function Fade (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level is begin - return Self.texture_Details.Fades (Which); + return Self.texture_Set.Details (detail_Count (Which)).Fade; end Fade; @@ -52,7 +54,7 @@ is Now : in texture_Set.Tiling) is begin - Self.texture_Details.texture_Tilings (Which) := Now; + Self.texture_Set.Details (detail_Count (Which)).texture_Tiling := Now; end Tiling_is; @@ -61,7 +63,7 @@ is function Tiling (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.Tiling is begin - return Self.texture_Details.texture_Tilings (Which); + return Self.texture_Set.Details (detail_Count (Which)).texture_Tiling; end Tiling; @@ -71,7 +73,7 @@ is Now : in openGL.asset_Name) is begin - Self.texture_Details.Textures (Positive (Which)) := Now; + Self.texture_Set.Details (detail_Count (Which)).Texture := Now; end Texture_is; @@ -81,7 +83,7 @@ is function texture_Count (Self : in textured_Item) return Natural is begin - return Self.texture_Details.texture_Count; + return Natural (Self.texture_Set.Count); end texture_Count; @@ -90,7 +92,7 @@ is function texture_Applied (Self : in textured_Item; Which : in texture_Set.texture_Id) return Boolean is begin - return Self.texture_Details.texture_Applies (Which); + return Self.texture_Set.Details (detail_Count (Which)).texture_Apply; end texture_Applied; @@ -100,7 +102,7 @@ is Now : in Boolean) is begin - Self.texture_Details.texture_Applies (Which) := Now; + Self.texture_Set.Details (detail_Count (Which)).texture_Apply := Now; end texture_Applied_is; @@ -109,30 +111,32 @@ is overriding procedure animate (Self : in out textured_Item) is - use type texture_Set.Animation_view; + -- use type texture_Set.Animation_view; begin if Self.texture_Details.Animation = null then return; end if; - texture_Set.animate (Self.texture_Details.Animation.all, - Self.texture_Details.texture_Applies); + -- texture_Set.animate (Self.texture_Set.Animation.all, + -- Self.texture_Set.texture_Applies); + + texture_Set.animate (Self.texture_Set); end animate; - function texture_Details (Self : in textured_Item) return openGL.texture_Set.Details + function texture_Details (Self : in textured_Item) return openGL.texture_Set.item is begin - return Self.texture_Details; + return Self.texture_Set; end texture_Details; - procedure texture_Details_is (Self : in out textured_Item; Now : in openGL.texture_Set.Details) + procedure texture_Details_is (Self : in out textured_Item; Now : in openGL.texture_Set.item) is begin - Self.texture_Details := Now; + Self.texture_Set := Now; end texture_Details_is; diff --git a/3-mid/opengl/source/lean/model/opengl-model-texturing.ads b/3-mid/opengl/source/lean/model/opengl-model-texturing.ads index 73aa282..0caeee7 100644 --- a/3-mid/opengl/source/lean/model/opengl-model-texturing.ads +++ b/3-mid/opengl/source/lean/model/opengl-model-texturing.ads @@ -58,9 +58,9 @@ is procedure animate (Self : in out textured_Item); - function texture_Details (Self : in textured_Item) return openGL.texture_Set.Details; + function texture_Details (Self : in textured_Item) return openGL.texture_Set.item; - procedure texture_Details_is (Self : in out textured_Item; Now : in openGL.texture_Set.Details); + procedure texture_Details_is (Self : in out textured_Item; Now : in openGL.texture_Set.item); @@ -68,7 +68,7 @@ is type textured_Item is abstract new Item with record - texture_Details : openGL.texture_Set.Details; + texture_Set : openGL.texture_Set.item; end record; end Mixin; diff --git a/3-mid/opengl/source/lean/opengl-terrain.adb b/3-mid/opengl/source/lean/opengl-terrain.adb index 8222880..0fd57c0 100644 --- a/3-mid/opengl/source/lean/opengl-terrain.adb +++ b/3-mid/opengl/source/lean/opengl-terrain.adb @@ -122,7 +122,7 @@ is Col => Col, Heights => the_Region.all'Access, color_Map => texture_File, - texture_Details => texture_Set.to_Details ([1 => texture_File]), + texture_Details => texture_Set.to_Set ([1 => texture_File]), Tiling => Tiling); the_height_Extents : constant Vector_2 := height_Extent (the_Region.all); diff --git a/3-mid/opengl/source/lean/opengl-texture_set.adb b/3-mid/opengl/source/lean/opengl-texture_set.adb index f9e091e..36b834b 100644 --- a/3-mid/opengl/source/lean/opengl-texture_set.adb +++ b/3-mid/opengl/source/lean/opengl-texture_set.adb @@ -19,82 +19,110 @@ is - procedure animate (the_Animation : in out Animation; - texture_Applies : in out texture_Apply_array) + -- procedure animate (the_Animation : in out Animation; + -- texture_Applies : in out texture_Apply_array) + -- is + -- use ada.Calendar; + -- + -- Now : constant ada.Calendar.Time := Clock; + -- + -- begin + -- if Now >= the_Animation.next_frame_Time + -- then + -- declare + -- next_frame_Id : constant frame_Id := (if the_Animation.Current < the_Animation.frame_Count then the_Animation.Current + 1 + -- else 1); + -- old_Frame : Frame renames the_Animation.Frames (the_Animation.Current); + -- new_Frame : Frame renames the_Animation.Frames (next_frame_Id); + -- begin + -- texture_Applies (old_Frame.texture_Id) := False; + -- texture_Applies (new_Frame.texture_Id) := True; + -- + -- the_Animation.Current := next_frame_Id; + -- the_Animation.next_frame_Time := Now + the_Animation.frame_Duration; + -- end; + -- end if; + -- end animate; + + + + procedure animate (Self : in out Item) is use ada.Calendar; Now : constant ada.Calendar.Time := Clock; begin - if Now >= the_Animation.next_frame_Time + if Now >= Self.Animation.next_frame_Time then declare - next_frame_Id : constant frame_Id := (if the_Animation.Current < the_Animation.frame_Count then the_Animation.Current + 1 - else 1); - old_Frame : Frame renames the_Animation.Frames (the_Animation.Current); - new_Frame : Frame renames the_Animation.Frames (next_frame_Id); + next_frame_Id : constant frame_Id := (if Self.Animation.Current < Self.Animation.frame_Count then Self.Animation.Current + 1 + else 1); + old_Frame : Frame renames Self.Animation.Frames (Self.Animation.Current); + new_Frame : Frame renames Self.Animation.Frames (next_frame_Id); begin - texture_Applies (old_Frame.texture_Id) := False; - texture_Applies (new_Frame.texture_Id) := True; + Self.Details (detail_Count (old_Frame.texture_Id)).texture_Apply := False; + Self.Details (detail_Count (new_Frame.texture_Id)).texture_Apply := True; - the_Animation.Current := next_frame_Id; - the_Animation.next_frame_Time := Now + the_Animation.frame_Duration; + Self.Animation.Current := next_frame_Id; + Self.Animation.next_frame_Time := Now + Self.Animation.frame_Duration; end; end if; end animate; - ----------- --- Details -- - function to_Details (texture_Assets : in asset_Names; - Animation : in Animation_view := null) return Details - is - Result : Details; - begin - Result.texture_Count := texture_Assets'Length; - - for i in 1 .. texture_Assets'Length - loop - Result.Textures (i) := texture_Assets (i); - end loop; - - Result.Animation := Animation; - - return Result; - end to_Details; - - - - -- function to_Set (texture_Assets : in asset_Names; - -- Animation : in Animation_view := null) return Item + -- function to_Details (texture_Assets : in asset_Names; + -- Animation : in Animation_view := null) return Details -- is - -- Result : Item (Count => texture_Assets'Length); - -- + -- Result : Details; -- begin - -- for i in 1 .. Result.Count - -- loop - -- Result.Details (i).Object := texture.null_Object; - -- Result.Details (i).Texture := texture_Assets (Integer (i)); - -- Result.Details (i).Fade := 0.0; - -- Result.Details (i).texture_Tiling := (S => 1.0, T => 1.0); + -- Result.texture_Count := texture_Assets'Length; -- - -- if i = 1 - -- then - -- Result.Details (i).texture_Apply := True; - -- else - -- Result.Details (i).texture_Apply := False; - -- end if; + -- for i in 1 .. texture_Assets'Length + -- loop + -- Result.Textures (i) := texture_Assets (i); -- end loop; -- -- Result.Animation := Animation; -- -- return Result; - -- end to_Set; + -- end to_Details; + + + + function to_Set (texture_Assets : in asset_Names; + texture_Tilings : in Tilings := [others => (S => 1.0, + T => 1.0)]; + + Animation : in Animation_view := null) return Item + is + Result : Item (Count => texture_Assets'Length); + + begin + for i in 1 .. Result.Count + loop + Result.Details (i).Object := texture.null_Object; + Result.Details (i).Texture := texture_Assets (Integer (i)); + Result.Details (i).Fade := 0.0; + Result.Details (i).texture_Tiling := texture_Tilings (texture_Id (i)); + + if i = 1 + then + Result.Details (i).texture_Apply := True; + else + Result.Details (i).texture_Apply := False; + end if; + end loop; + + Result.Animation := Animation; + + return Result; + end to_Set; diff --git a/3-mid/opengl/source/lean/opengl-texture_set.ads b/3-mid/opengl/source/lean/opengl-texture_set.ads index 9b5d843..b47f9c3 100644 --- a/3-mid/opengl/source/lean/opengl-texture_set.ads +++ b/3-mid/opengl/source/lean/opengl-texture_set.ads @@ -64,7 +64,7 @@ is --- Apply -- - type texture_Apply_array is array (texture_Set.texture_Id) of Boolean; + -- type texture_Apply_array is array (texture_Set.texture_Id) of Boolean; ------------- @@ -96,8 +96,8 @@ is type Animation_view is access all Animation; - procedure animate (the_Animation : in out Animation; - texture_Applies : in out texture_Apply_array); + -- procedure animate (the_Animation : in out Animation; + -- texture_Applies : in out texture_Apply_array); @@ -118,38 +118,54 @@ is --- Details -- - type Details is + -- type Details is + -- record + -- texture_Count : Natural := 0; + -- Fades : fade_Levels (texture_Id) := [others => 0.0]; + -- Textures : asset_Names (1 .. Positive (texture_Id'Last)) := [others => null_Asset]; + -- Objects : texture.Objects (1 .. Positive (texture_Id'Last)) := [others => texture.null_Object]; + -- texture_Tilings : Tilings := [others => (S => 1.0, + -- T => 1.0)]; + -- texture_Applies : texture_Apply_array := [1 => True, others => False]; -- The textures to be applied to the visual. + -- Animation : Animation_view; + -- end record; + + + + type Item (Count : detail_Count := 1) is record - texture_Count : Natural := 0; - Fades : fade_Levels (texture_Id) := [others => 0.0]; - Textures : asset_Names (1 .. Positive (texture_Id'Last)) := [others => null_Asset]; - Objects : texture.Objects (1 .. Positive (texture_Id'Last)) := [others => texture.null_Object]; - texture_Tilings : Tilings := [others => (S => 1.0, - T => 1.0)]; - texture_Applies : texture_Apply_array := [1 => True, others => False]; -- The textures to be applied to the visual. - Animation : Animation_view; + Details : Detail_array (1 .. Count); + Animation : Animation_view; end record; + null_Set : constant Item; + + + --------- --- Forge -- - function to_Details (texture_Assets : in asset_Names; - Animation : in Animation_view := null) return Details; - - no_Details : constant Details; + -- function to_Details (texture_Assets : in asset_Names; + -- Animation : in Animation_view := null) return Details; + -- + -- no_Details : constant Details; - -- function to_Set (texture_Assets : in asset_Names; - -- Animation : in Animation_view := null) return Item; + function to_Set (texture_Assets : in asset_Names; + texture_Tilings : in Tilings := [others => (S => 1.0, + T => 1.0)]; + Animation : in Animation_view := null) return Item; -------------- --- Attributes -- + procedure animate (Self : in out Item); + -- function get_Details (Self : in Item) return Detail_array; -- procedure Details_are (Self : in out Item; Now : in Detail_array); -- @@ -160,13 +176,6 @@ is private - -- type Item (Count : detail_Count := 1) is - -- record - -- Details : Detail_array (1 .. Count); - -- Animation : Animation_view; - -- end record; - - ----------- --- Streams @@ -182,8 +191,8 @@ private for Animation_view'read use read; - no_Details : constant Details := (others => <>); - -- null_Set : constant Item := (Count => 0, - -- others => <>); + -- no_Details : constant Details := (others => <>); + null_Set : constant Item := (Count => 0, + others => <>); end openGL.texture_Set; diff --git a/3-mid/opengl/source/lean/renderer/opengl-impostor.adb b/3-mid/opengl/source/lean/renderer/opengl-impostor.adb index b3c264f..b0d1d5a 100644 --- a/3-mid/opengl/source/lean/renderer/opengl-impostor.adb +++ b/3-mid/opengl/source/lean/renderer/opengl-impostor.adb @@ -84,7 +84,7 @@ is Height => Height), Plane => Model.billboard.xy, Texture => null_Asset, - texture_Details => texture_Set.to_Details ([1 => null_Asset])).all'Access); + texture_Details => texture_Set.to_Set ([1 => null_Asset])).all'Access); Self.Visual.Transform_is (Target.Transform); -- Self.Visual.model_Transform_is (Target.model_Transform); end set_Target; diff --git a/4-high/gel/applet/demo/models/opengl_model/launch_opengl_model.adb b/4-high/gel/applet/demo/models/opengl_model/launch_opengl_model.adb index 25c38e4..82ad4c1 100644 --- a/4-high/gel/applet/demo/models/opengl_model/launch_opengl_model.adb +++ b/4-high/gel/applet/demo/models/opengl_model/launch_opengl_model.adb @@ -35,7 +35,7 @@ is the_human_graphics_Model : constant openGL.Model.any.view := openGL.Model.any.new_Model (Model => openGL.to_Asset ("./assets/opengl/model/human.obj"), Texture => openGL.to_Asset ("./assets/opengl/texture/wooden-crate.jpg"), - texture_Details => openGL.texture_Set.to_Details ([1 => openGL.to_Asset ("./assets/opengl/texture/wooden-crate.jpg")]), + texture_Details => openGL.texture_Set.to_Set ([1 => openGL.to_Asset ("./assets/opengl/texture/wooden-crate.jpg")]), Texture_is_lucid => False); the_human_physics_Model : constant physics.Model.view @@ -54,7 +54,7 @@ is the_cobra_graphics_Model : aliased constant openGL.Model.any.view := openGL.Model.any.new_Model (Model => openGL.to_Asset ("./assets/oolite_cobra3.obj"), Texture => openGL.to_Asset ("./assets/oolite_cobra3_diffuse.png"), - texture_Details => openGL.texture_Set.to_Details ([1 => openGL.to_Asset ("./assets/oolite_cobra3_diffuse.png")]), + texture_Details => openGL.texture_Set.to_Set ([1 => openGL.to_Asset ("./assets/oolite_cobra3_diffuse.png")]), Texture_is_lucid => False); the_cobra_physics_Model : constant physics.Model.view diff --git a/4-high/gel/applet/demo/skinning/rig/box_rig/launch_rig_demo.adb b/4-high/gel/applet/demo/skinning/rig/box_rig/launch_rig_demo.adb index 5ae66cb..54844b0 100644 --- a/4-high/gel/applet/demo/skinning/rig/box_rig/launch_rig_demo.adb +++ b/4-high/gel/applet/demo/skinning/rig/box_rig/launch_rig_demo.adb @@ -47,7 +47,7 @@ is Model => openGL.to_Asset ("./box_1_bone.dae"), -- Model => openGL.to_Asset ("./box_2_bone.dae"), Texture => openGL.null_Asset, - texture_Details => openGL.texture_Set.to_Details ([1 => openGL.to_Asset ("./assets/opengl/textures/wooden-crate.jpg")]), + texture_Details => openGL.texture_Set.to_Set ([1 => openGL.to_Asset ("./assets/opengl/textures/wooden-crate.jpg")]), Texture_is_lucid => False); the_Rig : aliased gel.Rig.item; diff --git a/4-high/gel/applet/demo/sprite/mixed_shapes/launch_mixed_shapes.adb b/4-high/gel/applet/demo/sprite/mixed_shapes/launch_mixed_shapes.adb index db187de..fefb652 100644 --- a/4-high/gel/applet/demo/sprite/mixed_shapes/launch_mixed_shapes.adb +++ b/4-high/gel/applet/demo/sprite/mixed_shapes/launch_mixed_shapes.adb @@ -97,7 +97,7 @@ is Col => 1, Heights => openGL.Model.terrain.height_Map_view (gl_Heights), color_Map => terrain_Texture, - texture_Details => texture_Set.to_Details ([1 => terrain_Texture]), + texture_Details => texture_Set.to_Set ([1 => terrain_Texture]), Tiling => (s => (0.0, 1.0), t => (0.0, 1.0))); @@ -170,7 +170,7 @@ begin the_ball_Model : constant openGL.Model.sphere.lit_colored_textured.view := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius => 1.0, Image => openGL.to_Asset ("assets/gel/golf_green-16x16.tga"), - texture_Details => texture_Set.to_Details ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")])); + texture_Details => texture_Set.to_Set ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")])); the_Ball : constant gel.Sprite.view := gel.Sprite.forge.new_Sprite (Name => "demo.Ball", World => the_Applet.gui_World.all'Access, @@ -182,7 +182,7 @@ begin the_cone_Model : constant openGL.Model.any.view := openGL.Model.any.new_Model (Model => openGL.to_Asset ("assets/gel/model/unit_cone.obj"), Texture => openGL.to_Asset ("assets/gel/Face1.bmp"), - texture_Details => texture_Set.to_Details ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")]), + texture_Details => texture_Set.to_Set ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")]), Texture_is_lucid => False); the_cone_physics_Model : constant physics.Model.view @@ -198,7 +198,7 @@ begin the_cylinder_Model : constant openGL.Model.any.view := openGL.Model.any.new_Model (Model => openGL.to_Asset ("assets/gel/model/unit_cylinder.obj"), Texture => openGL.to_Asset ("assets/gel/Face1.bmp"), - texture_Details => texture_Set.to_Details ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")]), + texture_Details => texture_Set.to_Set ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")]), Texture_is_lucid => False); the_cylinder_physics_Model : constant physics.Model.view @@ -216,7 +216,7 @@ begin the_capsule_Model : constant openGL.Model.capsule.textured.view := openGL.Model.capsule.textured.new_Capsule (Radius => 0.5, Height => 2.0, - texture_Details => texture_Set.to_Details ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")]), + texture_Details => texture_Set.to_Set ([1 => openGL.to_Asset ("assets/gel/Face1.bmp")]), Image => openGL.to_Asset ("assets/gel/Face1.bmp")); diff --git a/4-high/gel/source/forge/gel-forge.adb b/4-high/gel/source/forge/gel-forge.adb index 19f9e0a..325bbaa 100644 --- a/4-high/gel/source/forge/gel-forge.adb +++ b/4-high/gel/source/forge/gel-forge.adb @@ -154,7 +154,7 @@ is then the_graphics_Model := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius, Color => Color, - texture_Details => openGL.texture_Set.to_Details ([1 => Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => Texture]), Image => Texture).all'Access; else the_graphics_Model := openGL.Model.circle.colored.new_circle (Radius, @@ -164,13 +164,7 @@ is else the_graphics_Model := openGL.Model.circle.lit_textured.new_Circle (Radius, - texture_Details => (Fades => [1 => 0.0, others => <>], - texture_Applies => [1 => True, others => <>], - Textures => [1 => Texture, others => <>], - Objects => [others => <>], - texture_Count => 1, - texture_Tilings => [others => (S => 1.0, T => 1.0)], - Animation => null)).all'Access; + texture_Details => openGL.texture_Set.to_Set ([1 => Texture])).all'Access; end if; return gel.Sprite.Forge.new_Sprite (Name, @@ -221,13 +215,16 @@ is (Color, openGL.Opaque)).all'Access; else the_graphics_Model := openGL.Model.polygon.lit_textured.new_Polygon (vertex_Sites => openGL.Vector_2_array (Vertices), - texture_Details => (Fades => [1 => 0.0, others => <>], - Textures => [1 => Texture, others => <>], - Objects => [others => <>], - texture_Count => 1, - texture_Tilings => texture_Tiling, - texture_Applies => [others => True], - Animation => null)).all'Access; + texture_Details => openGL.texture_Set.to_Set (texture_Assets => [1 => Texture], + texture_Tilings => texture_Tiling, + Animation => null)).all'Access; + -- texture_Details => (Fades => [1 => 0.0, others => <>], + -- Textures => [1 => Texture, others => <>], + -- Objects => [others => <>], + -- texture_Count => 1, + -- texture_Tilings => texture_Tiling, + -- texture_Applies => [others => True], + -- Animation => null)).all'Access; end if; return gel.Sprite.Forge.new_Sprite (Name, @@ -318,7 +315,7 @@ is the_graphics_Model := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius, lat_Count => lat_Count, long_Count => long_Count, - texture_Details => openGL.texture_Set.to_Details ([1 => Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => Texture]), Image => Texture).all'Access; else the_graphics_Model := openGL.Model.sphere.lit_colored.new_Sphere (Radius, @@ -337,7 +334,7 @@ is the_graphics_Model := openGL.Model.sphere.textured.new_Sphere (Radius, lat_Count => lat_Count, long_Count => long_Count, - texture_Details => openGL.texture_Set.to_Details ([1 => Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => Texture]), Image => Texture).all'Access; end if; end if; @@ -371,7 +368,7 @@ is begin the_graphics_Model := openGL.Model.sphere.textured.new_Sphere (Radius, lat_Count => 180, - texture_Details => openGL.texture_Set.to_Details ([1 => Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => Texture]), Image => Texture, is_Skysphere => True).all'Access; return gel.Sprite.Forge.new_Sprite ("skysphere_Sprite", @@ -449,7 +446,7 @@ is Lower => (texture_Name => Texture), Left => (texture_Name => Texture), Right => (texture_Name => Texture)], - texture_Details => openGL.texture_Set.to_Details ([1 => Texture])); + texture_Details => openGL.texture_Set.to_Set ([1 => Texture])); the_box_physics_Model : constant physics.Model.view := physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube, half_Extents => Size / 2.0), @@ -486,7 +483,7 @@ is Height => Size (2)), Plane => openGL.Model.Billboard.xy, Texture => Texture, - texture_Details => openGL.texture_Set.to_Details ([1 => Texture])); + texture_Details => openGL.texture_Set.to_Set ([1 => Texture])); the_billboard_physics_Model : constant physics.Model.view := physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube, @@ -527,7 +524,7 @@ is Plane => openGL.Model.Billboard.xy, Texture => Texture, Color => Color, - texture_Details => openGL.texture_Set.to_Details ([1 => Texture])); + texture_Details => openGL.texture_Set.to_Set ([1 => Texture])); the_billboard_physics_Model : constant physics.Model.view := physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube, half_Extents => Size / 2.0), @@ -690,7 +687,7 @@ is := openGL.Model.Text.lit_colored.new_Text (Text => Text, Font => Font, Color => (Color, openGL.Opaque), - texture_Details => openGL.texture_Set.to_Details ([1 => the_Texture]), + texture_Details => openGL.texture_Set.to_Set ([1 => the_Texture]), Centered => True); the_physics_Model : physics.Model.view; diff --git a/4-high/gel/source/human/gel-human.adb b/4-high/gel/source/human/gel-human.adb index cd53eb3..05d5f9d 100644 --- a/4-high/gel/source/human/gel-human.adb +++ b/4-high/gel/source/human/gel-human.adb @@ -479,7 +479,7 @@ is Model => openGL.to_Asset ("assets/gel/collada/mh-human-dae.dae"), -- model => gel.to_Asset ("assets/gel/collada/alfieri.dae"), Texture => openGL.null_Asset, -- gel.to_Asset ("assets/collada/gel-human-texture.tga"), - texture_Details => openGL.texture_Set.to_Details ([1 => openGL.to_Asset ("./assets/gel/Face1.bmp")]), + texture_Details => openGL.texture_Set.to_Set ([1 => openGL.to_Asset ("./assets/gel/Face1.bmp")]), Texture_is_lucid => False); begin Self.bone_Sprites (the_Bone) := gel.Sprite.forge.new_Sprite (Name => sprite_Name, diff --git a/4-high/gel/source/human/gel-human_v1.adb b/4-high/gel/source/human/gel-human_v1.adb index 16bcb3e..283fad0 100644 --- a/4-high/gel/source/human/gel-human_v1.adb +++ b/4-high/gel/source/human/gel-human_v1.adb @@ -705,7 +705,7 @@ is the_human_graphics_Model : aliased openGL.Model.any.view := openGL.Model.any.new_Model (Model => to_Asset (model_Name.all), Texture => openGL.null_Asset, -- gel.to_Asset ("assets/collada/gel-human-texture.tga"), - texture_Details => openGL.texture_Set.to_Details ([1 => openGL.to_Asset ("./assets/opengl/texture/wooden-crate.jpg")]), + texture_Details => openGL.texture_Set.to_Set ([1 => openGL.to_Asset ("./assets/opengl/texture/wooden-crate.jpg")]), Texture_is_lucid => False); the_physics_Model : constant standard.physics.Model.view