opengl: Revamp multi-texturing.
This commit is contained in:
@@ -31,7 +31,7 @@ begin
|
|||||||
--
|
--
|
||||||
the_Ball_1_Model : constant Model.Sphere.lit_colored_textured.view
|
the_Ball_1_Model : constant Model.Sphere.lit_colored_textured.view
|
||||||
:= openGL.Model.Sphere.lit_colored_textured.new_Sphere (Radius => 1.0,
|
:= 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);
|
Image => the_Texture);
|
||||||
the_Ball_2_Model : constant Model.Sphere.lit_colored.view
|
the_Ball_2_Model : constant Model.Sphere.lit_colored.view
|
||||||
:= openGL.Model.Sphere.lit_colored.new_Sphere (Radius => 1.0,
|
:= openGL.Model.Sphere.lit_colored.new_Sphere (Radius => 1.0,
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ begin
|
|||||||
:= Model.Billboard.textured.forge.new_Billboard (--Scale => (1.0, 1.0, 1.0),
|
:= Model.Billboard.textured.forge.new_Billboard (--Scale => (1.0, 1.0, 1.0),
|
||||||
Plane => Billboard.xy,
|
Plane => Billboard.xy,
|
||||||
Texture => the_Texture,
|
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
|
the_colored_Billboard_Model : constant Model.Billboard.colored_textured.view
|
||||||
:= Model.Billboard.colored_textured.new_Billboard (--Scale => (1.0, 1.0, 1.0),
|
:= Model.Billboard.colored_textured.new_Billboard (--Scale => (1.0, 1.0, 1.0),
|
||||||
Plane => Billboard.xy,
|
Plane => Billboard.xy,
|
||||||
Color => (Palette.Green, Opaque),
|
Color => (Palette.Green, Opaque),
|
||||||
Texture => the_Texture,
|
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.
|
-- The Sprites.
|
||||||
--
|
--
|
||||||
use openGL.Visual.Forge;
|
use openGL.Visual.Forge;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ begin
|
|||||||
Lower => (texture_Name => the_Texture),
|
Lower => (texture_Name => the_Texture),
|
||||||
Left => (texture_Name => the_Texture),
|
Left => (texture_Name => the_Texture),
|
||||||
Right => (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.
|
-- The Visuals.
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ begin
|
|||||||
:= Model.Text.lit_colored.new_Text (Text => "Howdy",
|
:= Model.Text.lit_colored.new_Text (Text => "Howdy",
|
||||||
Font => the_font_Id,
|
Font => the_font_Id,
|
||||||
Color => (Red, Opaque),
|
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);
|
Centered => False);
|
||||||
|
|
||||||
-- The sprites.
|
-- The sprites.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ begin
|
|||||||
|
|
||||||
the_ball_Model : constant Model.Sphere.lit_colored_textured.view
|
the_ball_Model : constant Model.Sphere.lit_colored_textured.view
|
||||||
:= Model.Sphere.lit_colored_textured.new_Sphere (radius => 0.5,
|
:= 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.
|
-- The Sprites.
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -152,25 +152,25 @@ is
|
|||||||
|
|
||||||
the_ball_3_Model : constant Model.sphere.lit_textured.view
|
the_ball_3_Model : constant Model.sphere.lit_textured.view
|
||||||
:= Model.sphere.lit_textured.new_Sphere (Radius => 1.0,
|
:= 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);
|
Image => the_Texture);
|
||||||
|
|
||||||
the_ball_4_Model : constant Model.sphere.lit_colored_textured.view
|
the_ball_4_Model : constant Model.sphere.lit_colored_textured.view
|
||||||
:= Model.sphere.lit_colored_textured.new_Sphere (Radius => 1.0,
|
:= 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);
|
Image => the_Texture);
|
||||||
|
|
||||||
the_billboard_Model : constant Model.billboard.textured.view
|
the_billboard_Model : constant Model.billboard.textured.view
|
||||||
:= Model.billboard.textured.forge.new_Billboard (Size => (1.0, 1.0),
|
:= Model.billboard.textured.forge.new_Billboard (Size => (1.0, 1.0),
|
||||||
Plane => Billboard.xy,
|
Plane => Billboard.xy,
|
||||||
texture_Details => texture_Set.to_Details ([1 => the_Texture]),
|
texture_Details => texture_Set.to_Set ([1 => the_Texture]),
|
||||||
Texture => the_Texture);
|
Texture => the_Texture);
|
||||||
|
|
||||||
the_colored_billboard_Model : constant Model.billboard.textured.view -- TODO: Add color.
|
the_colored_billboard_Model : constant Model.billboard.textured.view -- TODO: Add color.
|
||||||
:= Model.billboard.textured.forge.new_Billboard (Size => (1.0, 1.0),
|
:= Model.billboard.textured.forge.new_Billboard (Size => (1.0, 1.0),
|
||||||
Plane => Billboard.xy,
|
Plane => Billboard.xy,
|
||||||
Texture => the_Texture,
|
Texture => the_Texture,
|
||||||
texture_Details => texture_Set.to_Details ([1 => the_Texture]));
|
texture_Details => texture_Set.to_Set ([1 => the_Texture]));
|
||||||
use Model.box;
|
use Model.box;
|
||||||
|
|
||||||
the_box_1_Model : constant Model.box.colored.view
|
the_box_1_Model : constant Model.box.colored.view
|
||||||
@@ -187,24 +187,24 @@ is
|
|||||||
:= Model.box.lit_textured.new_Box
|
:= Model.box.lit_textured.new_Box
|
||||||
(Size => [1.0, 2.0, 1.0],
|
(Size => [1.0, 2.0, 1.0],
|
||||||
Faces => [others => (texture_Name => the_Texture)],
|
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
|
the_box_3_Model : constant Model.box.textured.view
|
||||||
:= Model.box.textured.new_Box
|
:= Model.box.textured.new_Box
|
||||||
(Size => [1.0, 2.0, 3.0],
|
(Size => [1.0, 2.0, 3.0],
|
||||||
Faces => [others => (texture_Name => the_Texture)],
|
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
|
the_capsule_Model : constant Model.capsule.lit_textured.view
|
||||||
:= Model.capsule.lit_textured.new_Capsule (Radius => 0.5,
|
:= Model.capsule.lit_textured.new_Capsule (Radius => 0.5,
|
||||||
Height => 2.0,
|
Height => 2.0,
|
||||||
texture_Details => texture_Set.to_Details ([1 => the_Texture]),
|
texture_Details => texture_Set.to_Set ([1 => the_Texture]),
|
||||||
Image => the_Texture);
|
Image => the_Texture);
|
||||||
|
|
||||||
the_lit_textured_circle_Model : constant Model.circle.lit_textured.view
|
the_lit_textured_circle_Model : constant Model.circle.lit_textured.view
|
||||||
:= Model.circle.lit_textured.new_Circle (Radius => 1.5,
|
:= 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);
|
Sides => 24);
|
||||||
|
|
||||||
the_grid_Model : constant Model.grid.view
|
the_grid_Model : constant Model.grid.view
|
||||||
@@ -219,7 +219,7 @@ is
|
|||||||
|
|
||||||
the_textured_hexagon_Model : constant Model.hexagon.lit_textured.view
|
the_textured_hexagon_Model : constant Model.hexagon.lit_textured.view
|
||||||
:= Model.hexagon.lit_textured.new_Hexagon (Radius => 0.5,
|
:= 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
|
the_faceted_hexagon_column_Model : constant Model.hexagon_Column.lit_colored_faceted.view
|
||||||
:= Model.hexagon_Column.lit_colored_faceted.new_hexagon_Column
|
:= 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.any.new_Model (--Scale => (1.0, 1.0, 1.0),
|
||||||
Model => to_Asset ("assets/opengl/model/human.obj"),
|
Model => to_Asset ("assets/opengl/model/human.obj"),
|
||||||
Texture => the_Texture,
|
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);
|
Texture_is_lucid => False);
|
||||||
|
|
||||||
the_lit_colored_polygon_Model : constant Model.polygon.lit_colored.view
|
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
|
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]],
|
:= 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
|
the_text_Model : constant Model.Text.lit_colored.view
|
||||||
:= Model.Text.lit_colored.new_Text (Text => "Once upon a midnight dreary ...",
|
:= Model.Text.lit_colored.new_Text (Text => "Once upon a midnight dreary ...",
|
||||||
Font => the_font_Id,
|
Font => the_font_Id,
|
||||||
Color => (Green, Opaque),
|
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);
|
Centered => True);
|
||||||
|
|
||||||
the_segment_line_Model : constant Model.segment_line.view
|
the_segment_line_Model : constant Model.segment_line.view
|
||||||
@@ -290,7 +290,7 @@ is
|
|||||||
Col => 1,
|
Col => 1,
|
||||||
Heights => the_Region.all'Access,
|
Heights => the_Region.all'Access,
|
||||||
Color_Map => texture_File,
|
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);
|
Tiling => Tiling);
|
||||||
begin
|
begin
|
||||||
Demo.Renderer.add_Font (the_font_Id);
|
Demo.Renderer.add_Font (the_font_Id);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ is
|
|||||||
|
|
||||||
function to_Model (Model : in asset_Name;
|
function to_Model (Model : in asset_Name;
|
||||||
Texture : 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
|
Texture_is_lucid : in Boolean) return openGL.Model.any.item
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
@@ -50,7 +50,7 @@ is
|
|||||||
|
|
||||||
function new_Model (Model : in asset_Name;
|
function new_Model (Model : in asset_Name;
|
||||||
Texture : 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
|
Texture_is_lucid : in Boolean) return openGL.Model.any.view
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ is
|
|||||||
|
|
||||||
function new_Model (Model : in asset_Name;
|
function new_Model (Model : in asset_Name;
|
||||||
Texture : 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;
|
Texture_is_lucid : in Boolean) return openGL.Model.any.view;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ is
|
|||||||
Plane : in billboard.Plane;
|
Plane : in billboard.Plane;
|
||||||
Color : in lucid_Color;
|
Color : in lucid_Color;
|
||||||
Texture : in asset_Name;
|
Texture : in asset_Name;
|
||||||
texture_Details : in texture_Set.Details) return View
|
texture_Details : in texture_Set.item) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
begin
|
begin
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ is
|
|||||||
Plane : in billboard.Plane;
|
Plane : in billboard.Plane;
|
||||||
Color : in lucid_Color;
|
Color : in lucid_Color;
|
||||||
Texture : in asset_Name;
|
Texture : in asset_Name;
|
||||||
texture_Details : in texture_Set.Details) return View;
|
texture_Details : in texture_Set.item) return View;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
--- Attributes
|
--- Attributes
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ is
|
|||||||
function new_Billboard (Size : in Size_t := default_Size;
|
function new_Billboard (Size : in Size_t := default_Size;
|
||||||
Plane : in billboard.Plane;
|
Plane : in billboard.Plane;
|
||||||
Texture : in asset_Name;
|
Texture : in asset_Name;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Lucid : in Boolean := False) return View
|
Lucid : in Boolean := False) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item (Lucid);
|
Self : constant View := new Item (Lucid);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ is
|
|||||||
function new_Billboard (Size : in Size_t := default_Size;
|
function new_Billboard (Size : in Size_t := default_Size;
|
||||||
Plane : in billboard.Plane;
|
Plane : in billboard.Plane;
|
||||||
Texture : in asset_Name;
|
Texture : in asset_Name;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Lucid : in Boolean := False) return View;
|
Lucid : in Boolean := False) return View;
|
||||||
end Forge;
|
end Forge;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ is
|
|||||||
|
|
||||||
function new_Box (Size : in Vector_3;
|
function new_Box (Size : in Vector_3;
|
||||||
Faces : in lit_textured.Faces;
|
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
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ is
|
|||||||
|
|
||||||
function new_Box (Size : in Vector_3;
|
function new_Box (Size : in Vector_3;
|
||||||
Faces : in lit_textured.Faces;
|
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;
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ is
|
|||||||
|
|
||||||
function new_Box (Size : in Vector_3;
|
function new_Box (Size : in Vector_3;
|
||||||
Faces : in textured.Faces;
|
Faces : in textured.Faces;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
is_Skybox : in Boolean := False) return View
|
is_Skybox : in Boolean := False) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ is
|
|||||||
|
|
||||||
function new_Box (Size : in Vector_3;
|
function new_Box (Size : in Vector_3;
|
||||||
Faces : in textured.Faces;
|
Faces : in textured.Faces;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
is_Skybox : in Boolean := False) return View;
|
is_Skybox : in Boolean := False) return View;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ is
|
|||||||
|
|
||||||
function new_Capsule (Radius : in Real;
|
function new_Capsule (Radius : in Real;
|
||||||
Height : 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
|
Image : in asset_Name := null_Asset) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ is
|
|||||||
|
|
||||||
function new_Capsule (Radius : in Real;
|
function new_Capsule (Radius : in Real;
|
||||||
Height : 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;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ is
|
|||||||
|
|
||||||
function new_Capsule (Radius : in Real;
|
function new_Capsule (Radius : in Real;
|
||||||
Height : 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
|
Image : in asset_Name := null_Asset) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ is
|
|||||||
|
|
||||||
function new_Capsule (Radius : in Real;
|
function new_Capsule (Radius : in Real;
|
||||||
Height : 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;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_circle (Radius : in Real;
|
function new_circle (Radius : in Real;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Sides : in Positive := 24) return View
|
Sides : in Positive := 24) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
@@ -84,7 +84,7 @@ is
|
|||||||
the_Geometry.Vertices_are (Vertices);
|
the_Geometry.Vertices_are (Vertices);
|
||||||
the_Geometry.add (Primitive.view (the_Primitive));
|
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
|
loop
|
||||||
put_Line ("KKK" & Self.texture_Details'Image);
|
put_Line ("KKK" & Self.texture_Details'Image);
|
||||||
|
|
||||||
@@ -94,9 +94,9 @@ is
|
|||||||
-- the_Geometry.Fade_is (which => Id,
|
-- the_Geometry.Fade_is (which => Id,
|
||||||
-- now => Self.texture_Details.Fades (Id));
|
-- now => Self.texture_Details.Fades (Id));
|
||||||
|
|
||||||
the_Geometry.Texture_is (which => 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);
|
the_Geometry.is_Transparent (Now => the_Geometry.Texture.is_Transparent);
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
the_Geometry.is_Transparent (True); -- TODO: Do transparency properly.
|
the_Geometry.is_Transparent (True); -- TODO: Do transparency properly.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_circle (Radius : in Real;
|
function new_circle (Radius : in Real;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Sides : in Positive := 24) return View;
|
Sides : in Positive := 24) return View;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_Hexagon (Radius : in Real;
|
function new_Hexagon (Radius : in Real;
|
||||||
texture_Details : in texture_Set.Details) return View
|
texture_Details : in texture_Set.item) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
begin
|
begin
|
||||||
@@ -64,7 +64,7 @@ is
|
|||||||
the_Geometry.Vertices_are (Vertices);
|
the_Geometry.Vertices_are (Vertices);
|
||||||
the_Geometry.add (Primitive.view (the_Primitive));
|
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
|
loop
|
||||||
Id := texture_Id (i);
|
Id := texture_Id (i);
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ is
|
|||||||
-- Now => Self.texture_Details.Fades (Id));
|
-- Now => Self.texture_Details.Fades (Id));
|
||||||
|
|
||||||
the_Geometry.Texture_is (Which => 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);
|
the_Geometry.is_Transparent (Now => the_Geometry.Texture.is_Transparent);
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_Hexagon (Radius : in Real;
|
function new_Hexagon (Radius : in Real;
|
||||||
texture_Details : in texture_Set.Details) return View;
|
texture_Details : in texture_Set.item) return View;
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_polygon (vertex_Sites : in Vector_2_array;
|
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
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
begin
|
begin
|
||||||
@@ -74,7 +74,7 @@ is
|
|||||||
the_Geometry.Vertices_are (Vertices);
|
the_Geometry.Vertices_are (Vertices);
|
||||||
the_Geometry.add (Primitive.view (the_Primitive));
|
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
|
loop
|
||||||
Id := texture_Id (i);
|
Id := texture_Id (i);
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ is
|
|||||||
-- Now => Self.texture_Details.Fades (Id));
|
-- Now => Self.texture_Details.Fades (Id));
|
||||||
|
|
||||||
the_Geometry.Texture_is (Which => 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);
|
the_Geometry.is_Transparent (Now => the_Geometry.Texture.is_Transparent);
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_Polygon (vertex_Sites : in Vector_2_array;
|
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
|
--- Attributes
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ is
|
|||||||
long_Count : in Positive := default_longitude_Count;
|
long_Count : in Positive := default_longitude_Count;
|
||||||
Color : in openGL.lucid_Color := (openGL.Palette.Grey,
|
Color : in openGL.lucid_Color := (openGL.Palette.Grey,
|
||||||
Opacity => 1.0);
|
Opacity => 1.0);
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Image : in asset_Name := null_Asset) return View
|
Image : in asset_Name := null_Asset) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ is
|
|||||||
long_Count : in Positive := default_longitude_Count;
|
long_Count : in Positive := default_longitude_Count;
|
||||||
Color : in openGL.lucid_Color := (openGL.Palette.Grey,
|
Color : in openGL.lucid_Color := (openGL.Palette.Grey,
|
||||||
Opacity => 1.0);
|
Opacity => 1.0);
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Image : in asset_Name := null_Asset) return View;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ is
|
|||||||
function new_Sphere (Radius : in Real;
|
function new_Sphere (Radius : in Real;
|
||||||
lat_Count : in Positive := default_latitude_Count;
|
lat_Count : in Positive := default_latitude_Count;
|
||||||
long_Count : in Positive := default_longitude_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
|
Image : in asset_Name := null_Asset) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ is
|
|||||||
function new_Sphere (Radius : in Real;
|
function new_Sphere (Radius : in Real;
|
||||||
lat_Count : in Positive := default_latitude_Count;
|
lat_Count : in Positive := default_latitude_Count;
|
||||||
long_Count : in Positive := default_longitude_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;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ is
|
|||||||
lat_Count : in Positive := 26;
|
lat_Count : in Positive := 26;
|
||||||
long_Count : in Positive := 52;
|
long_Count : in Positive := 52;
|
||||||
Image : in asset_Name := null_Asset;
|
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_Skysphere : in Boolean := False) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ is
|
|||||||
lat_Count : in Positive := 26;
|
lat_Count : in Positive := 26;
|
||||||
long_Count : in Positive := 52;
|
long_Count : in Positive := 52;
|
||||||
Image : in asset_Name := null_Asset;
|
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_Skysphere : in Boolean := False) return View;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ is
|
|||||||
Row, Col : in Integer;
|
Row, Col : in Integer;
|
||||||
Heights : in height_Map_view;
|
Heights : in height_Map_view;
|
||||||
color_Map : in asset_Name;
|
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),
|
Tiling : in texture_Transform_2d := (S => (0.0, 1.0),
|
||||||
T => (0.0, 1.0))) return View
|
T => (0.0, 1.0))) return View
|
||||||
is
|
is
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ is
|
|||||||
Row, Col : in Integer;
|
Row, Col : in Integer;
|
||||||
Heights : in height_Map_view;
|
Heights : in height_Map_view;
|
||||||
color_Map : in asset_Name;
|
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),
|
Tiling : in texture_Transform_2d := (S => (0.0, 1.0),
|
||||||
T => (0.0, 1.0))) return View;
|
T => (0.0, 1.0))) return View;
|
||||||
overriding
|
overriding
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ is
|
|||||||
function new_Text (Text : in String;
|
function new_Text (Text : in String;
|
||||||
Font : in openGL.Font.font_Id;
|
Font : in openGL.Font.font_Id;
|
||||||
Color : in lucid_Color;
|
Color : in lucid_Color;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Centered : in Boolean := True) return View
|
Centered : in Boolean := True) return View
|
||||||
is
|
is
|
||||||
Font_Name : constant String := to_String (Font.Name);
|
Font_Name : constant String := to_String (Font.Name);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ is
|
|||||||
function new_Text (Text : in String;
|
function new_Text (Text : in String;
|
||||||
Font : in openGL.Font.font_Id;
|
Font : in openGL.Font.font_Id;
|
||||||
Color : in lucid_Color;
|
Color : in lucid_Color;
|
||||||
texture_Details : in texture_Set.Details;
|
texture_Details : in texture_Set.item;
|
||||||
Centered : in Boolean := True) return View;
|
Centered : in Boolean := True) return View;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ is
|
|||||||
|
|
||||||
package body Mixin
|
package body Mixin
|
||||||
is
|
is
|
||||||
|
use openGL.texture_Set;
|
||||||
|
|
||||||
|
|
||||||
overriding
|
overriding
|
||||||
procedure texture_Object_is (Self : in out textured_Item; Which : in texture_Set.texture_Id;
|
procedure texture_Object_is (Self : in out textured_Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.texture.Object)
|
Now : in openGL.texture.Object)
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
Self.texture_Details.Objects (Integer (Which)) := Now;
|
Self.texture_Set.Details (detail_Count (Which)).Object := Now;
|
||||||
end texture_Object_is;
|
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
|
function texture_Object (Self : in textured_Item; Which : in texture_Set.texture_Id) return openGL.texture.Object
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return Self.texture_Details.Objects (Integer (Which));
|
return Self.texture_Set.Details (detail_Count (Which)).Object;
|
||||||
end texture_Object;
|
end texture_Object;
|
||||||
|
|
||||||
|
|
||||||
@@ -33,7 +35,7 @@ is
|
|||||||
Now : in texture_Set.fade_Level)
|
Now : in texture_Set.fade_Level)
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
Self.texture_Details.Fades (Which) := Now;
|
Self.texture_Set.Details (detail_Count (Which)).Fade := Now;
|
||||||
end Fade_is;
|
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
|
function Fade (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return Self.texture_Details.Fades (Which);
|
return Self.texture_Set.Details (detail_Count (Which)).Fade;
|
||||||
end Fade;
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
@@ -52,7 +54,7 @@ is
|
|||||||
Now : in texture_Set.Tiling)
|
Now : in texture_Set.Tiling)
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
Self.texture_Details.texture_Tilings (Which) := Now;
|
Self.texture_Set.Details (detail_Count (Which)).texture_Tiling := Now;
|
||||||
end Tiling_is;
|
end Tiling_is;
|
||||||
|
|
||||||
|
|
||||||
@@ -61,7 +63,7 @@ is
|
|||||||
function Tiling (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.Tiling
|
function Tiling (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.Tiling
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return Self.texture_Details.texture_Tilings (Which);
|
return Self.texture_Set.Details (detail_Count (Which)).texture_Tiling;
|
||||||
end Tiling;
|
end Tiling;
|
||||||
|
|
||||||
|
|
||||||
@@ -71,7 +73,7 @@ is
|
|||||||
Now : in openGL.asset_Name)
|
Now : in openGL.asset_Name)
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
Self.texture_Details.Textures (Positive (Which)) := Now;
|
Self.texture_Set.Details (detail_Count (Which)).Texture := Now;
|
||||||
end Texture_is;
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
@@ -81,7 +83,7 @@ is
|
|||||||
function texture_Count (Self : in textured_Item) return Natural
|
function texture_Count (Self : in textured_Item) return Natural
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return Self.texture_Details.texture_Count;
|
return Natural (Self.texture_Set.Count);
|
||||||
end texture_Count;
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
@@ -90,7 +92,7 @@ is
|
|||||||
function texture_Applied (Self : in textured_Item; Which : in texture_Set.texture_Id) return Boolean
|
function texture_Applied (Self : in textured_Item; Which : in texture_Set.texture_Id) return Boolean
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return Self.texture_Details.texture_Applies (Which);
|
return Self.texture_Set.Details (detail_Count (Which)).texture_Apply;
|
||||||
end texture_Applied;
|
end texture_Applied;
|
||||||
|
|
||||||
|
|
||||||
@@ -100,7 +102,7 @@ is
|
|||||||
Now : in Boolean)
|
Now : in Boolean)
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
Self.texture_Details.texture_Applies (Which) := Now;
|
Self.texture_Set.Details (detail_Count (Which)).texture_Apply := Now;
|
||||||
end texture_Applied_is;
|
end texture_Applied_is;
|
||||||
|
|
||||||
|
|
||||||
@@ -109,30 +111,32 @@ is
|
|||||||
overriding
|
overriding
|
||||||
procedure animate (Self : in out textured_Item)
|
procedure animate (Self : in out textured_Item)
|
||||||
is
|
is
|
||||||
use type texture_Set.Animation_view;
|
-- use type texture_Set.Animation_view;
|
||||||
begin
|
begin
|
||||||
if Self.texture_Details.Animation = null
|
if Self.texture_Details.Animation = null
|
||||||
then
|
then
|
||||||
return;
|
return;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
texture_Set.animate (Self.texture_Details.Animation.all,
|
-- texture_Set.animate (Self.texture_Set.Animation.all,
|
||||||
Self.texture_Details.texture_Applies);
|
-- Self.texture_Set.texture_Applies);
|
||||||
|
|
||||||
|
texture_Set.animate (Self.texture_Set);
|
||||||
end animate;
|
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
|
is
|
||||||
begin
|
begin
|
||||||
return Self.texture_Details;
|
return Self.texture_Set;
|
||||||
end texture_Details;
|
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
|
is
|
||||||
begin
|
begin
|
||||||
Self.texture_Details := Now;
|
Self.texture_Set := Now;
|
||||||
end texture_Details_is;
|
end texture_Details_is;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ is
|
|||||||
procedure animate (Self : in out textured_Item);
|
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
|
type textured_Item is abstract new Item with
|
||||||
record
|
record
|
||||||
texture_Details : openGL.texture_Set.Details;
|
texture_Set : openGL.texture_Set.item;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
end Mixin;
|
end Mixin;
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ is
|
|||||||
Col => Col,
|
Col => Col,
|
||||||
Heights => the_Region.all'Access,
|
Heights => the_Region.all'Access,
|
||||||
color_Map => texture_File,
|
color_Map => texture_File,
|
||||||
texture_Details => texture_Set.to_Details ([1 => texture_File]),
|
texture_Details => texture_Set.to_Set ([1 => texture_File]),
|
||||||
Tiling => Tiling);
|
Tiling => Tiling);
|
||||||
|
|
||||||
the_height_Extents : constant Vector_2 := height_Extent (the_Region.all);
|
the_height_Extents : constant Vector_2 := height_Extent (the_Region.all);
|
||||||
|
|||||||
@@ -19,82 +19,110 @@ is
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure animate (the_Animation : in out Animation;
|
-- procedure animate (the_Animation : in out Animation;
|
||||||
texture_Applies : in out texture_Apply_array)
|
-- 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
|
is
|
||||||
use ada.Calendar;
|
use ada.Calendar;
|
||||||
|
|
||||||
Now : constant ada.Calendar.Time := Clock;
|
Now : constant ada.Calendar.Time := Clock;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Now >= the_Animation.next_frame_Time
|
if Now >= Self.Animation.next_frame_Time
|
||||||
then
|
then
|
||||||
declare
|
declare
|
||||||
next_frame_Id : constant frame_Id := (if the_Animation.Current < the_Animation.frame_Count then the_Animation.Current + 1
|
next_frame_Id : constant frame_Id := (if Self.Animation.Current < Self.Animation.frame_Count then Self.Animation.Current + 1
|
||||||
else 1);
|
else 1);
|
||||||
old_Frame : Frame renames the_Animation.Frames (the_Animation.Current);
|
old_Frame : Frame renames Self.Animation.Frames (Self.Animation.Current);
|
||||||
new_Frame : Frame renames the_Animation.Frames (next_frame_Id);
|
new_Frame : Frame renames Self.Animation.Frames (next_frame_Id);
|
||||||
begin
|
begin
|
||||||
texture_Applies (old_Frame.texture_Id) := False;
|
Self.Details (detail_Count (old_Frame.texture_Id)).texture_Apply := False;
|
||||||
texture_Applies (new_Frame.texture_Id) := True;
|
Self.Details (detail_Count (new_Frame.texture_Id)).texture_Apply := True;
|
||||||
|
|
||||||
the_Animation.Current := next_frame_Id;
|
Self.Animation.Current := next_frame_Id;
|
||||||
the_Animation.next_frame_Time := Now + the_Animation.frame_Duration;
|
Self.Animation.next_frame_Time := Now + Self.Animation.frame_Duration;
|
||||||
end;
|
end;
|
||||||
end if;
|
end if;
|
||||||
end animate;
|
end animate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
-----------
|
||||||
--- Details
|
--- Details
|
||||||
--
|
--
|
||||||
|
|
||||||
function to_Details (texture_Assets : in asset_Names;
|
-- function to_Details (texture_Assets : in asset_Names;
|
||||||
Animation : in Animation_view := null) return Details
|
-- 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
|
|
||||||
-- is
|
-- is
|
||||||
-- Result : Item (Count => texture_Assets'Length);
|
-- Result : Details;
|
||||||
--
|
|
||||||
-- begin
|
-- begin
|
||||||
-- for i in 1 .. Result.Count
|
-- Result.texture_Count := texture_Assets'Length;
|
||||||
-- 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);
|
|
||||||
--
|
--
|
||||||
-- if i = 1
|
-- for i in 1 .. texture_Assets'Length
|
||||||
-- then
|
-- loop
|
||||||
-- Result.Details (i).texture_Apply := True;
|
-- Result.Textures (i) := texture_Assets (i);
|
||||||
-- else
|
|
||||||
-- Result.Details (i).texture_Apply := False;
|
|
||||||
-- end if;
|
|
||||||
-- end loop;
|
-- end loop;
|
||||||
--
|
--
|
||||||
-- Result.Animation := Animation;
|
-- Result.Animation := Animation;
|
||||||
--
|
--
|
||||||
-- return Result;
|
-- 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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ is
|
|||||||
--- Apply
|
--- 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;
|
type Animation_view is access all Animation;
|
||||||
|
|
||||||
|
|
||||||
procedure animate (the_Animation : in out Animation;
|
-- procedure animate (the_Animation : in out Animation;
|
||||||
texture_Applies : in out texture_Apply_array);
|
-- texture_Applies : in out texture_Apply_array);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -118,38 +118,54 @@ is
|
|||||||
--- Details
|
--- 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
|
record
|
||||||
texture_Count : Natural := 0;
|
Details : Detail_array (1 .. Count);
|
||||||
Fades : fade_Levels (texture_Id) := [others => 0.0];
|
Animation : Animation_view;
|
||||||
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;
|
end record;
|
||||||
|
|
||||||
|
null_Set : constant Item;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---------
|
---------
|
||||||
--- Forge
|
--- Forge
|
||||||
--
|
--
|
||||||
|
|
||||||
function to_Details (texture_Assets : in asset_Names;
|
-- function to_Details (texture_Assets : in asset_Names;
|
||||||
Animation : in Animation_view := null) return Details;
|
-- Animation : in Animation_view := null) return Details;
|
||||||
|
--
|
||||||
no_Details : constant Details;
|
-- no_Details : constant Details;
|
||||||
|
|
||||||
|
|
||||||
-- function to_Set (texture_Assets : in asset_Names;
|
function to_Set (texture_Assets : in asset_Names;
|
||||||
-- Animation : in Animation_view := null) return Item;
|
texture_Tilings : in Tilings := [others => (S => 1.0,
|
||||||
|
T => 1.0)];
|
||||||
|
Animation : in Animation_view := null) return Item;
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
--- Attributes
|
--- Attributes
|
||||||
--
|
--
|
||||||
|
|
||||||
|
procedure animate (Self : in out Item);
|
||||||
|
|
||||||
-- function get_Details (Self : in Item) return Detail_array;
|
-- function get_Details (Self : in Item) return Detail_array;
|
||||||
-- procedure Details_are (Self : in out Item; Now : in Detail_array);
|
-- procedure Details_are (Self : in out Item; Now : in Detail_array);
|
||||||
--
|
--
|
||||||
@@ -160,13 +176,6 @@ is
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
-- type Item (Count : detail_Count := 1) is
|
|
||||||
-- record
|
|
||||||
-- Details : Detail_array (1 .. Count);
|
|
||||||
-- Animation : Animation_view;
|
|
||||||
-- end record;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
-----------
|
||||||
--- Streams
|
--- Streams
|
||||||
@@ -182,8 +191,8 @@ private
|
|||||||
for Animation_view'read use read;
|
for Animation_view'read use read;
|
||||||
|
|
||||||
|
|
||||||
no_Details : constant Details := (others => <>);
|
-- no_Details : constant Details := (others => <>);
|
||||||
-- null_Set : constant Item := (Count => 0,
|
null_Set : constant Item := (Count => 0,
|
||||||
-- others => <>);
|
others => <>);
|
||||||
|
|
||||||
end openGL.texture_Set;
|
end openGL.texture_Set;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ is
|
|||||||
Height => Height),
|
Height => Height),
|
||||||
Plane => Model.billboard.xy,
|
Plane => Model.billboard.xy,
|
||||||
Texture => null_Asset,
|
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.Transform_is (Target.Transform);
|
||||||
-- Self.Visual.model_Transform_is (Target.model_Transform);
|
-- Self.Visual.model_Transform_is (Target.model_Transform);
|
||||||
end set_Target;
|
end set_Target;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ is
|
|||||||
the_human_graphics_Model : constant openGL.Model.any.view
|
the_human_graphics_Model : constant openGL.Model.any.view
|
||||||
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("./assets/opengl/model/human.obj"),
|
:= 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 => 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);
|
Texture_is_lucid => False);
|
||||||
|
|
||||||
the_human_physics_Model : constant physics.Model.view
|
the_human_physics_Model : constant physics.Model.view
|
||||||
@@ -54,7 +54,7 @@ is
|
|||||||
the_cobra_graphics_Model : aliased constant openGL.Model.any.view
|
the_cobra_graphics_Model : aliased constant openGL.Model.any.view
|
||||||
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("./assets/oolite_cobra3.obj"),
|
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("./assets/oolite_cobra3.obj"),
|
||||||
Texture => openGL.to_Asset ("./assets/oolite_cobra3_diffuse.png"),
|
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);
|
Texture_is_lucid => False);
|
||||||
|
|
||||||
the_cobra_physics_Model : constant physics.Model.view
|
the_cobra_physics_Model : constant physics.Model.view
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ is
|
|||||||
Model => openGL.to_Asset ("./box_1_bone.dae"),
|
Model => openGL.to_Asset ("./box_1_bone.dae"),
|
||||||
-- Model => openGL.to_Asset ("./box_2_bone.dae"),
|
-- Model => openGL.to_Asset ("./box_2_bone.dae"),
|
||||||
Texture => openGL.null_Asset,
|
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);
|
Texture_is_lucid => False);
|
||||||
the_Rig : aliased gel.Rig.item;
|
the_Rig : aliased gel.Rig.item;
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ is
|
|||||||
Col => 1,
|
Col => 1,
|
||||||
Heights => openGL.Model.terrain.height_Map_view (gl_Heights),
|
Heights => openGL.Model.terrain.height_Map_view (gl_Heights),
|
||||||
color_Map => terrain_Texture,
|
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),
|
Tiling => (s => (0.0, 1.0),
|
||||||
t => (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
|
the_ball_Model : constant openGL.Model.sphere.lit_colored_textured.view
|
||||||
:= openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius => 1.0,
|
:= openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius => 1.0,
|
||||||
Image => openGL.to_Asset ("assets/gel/golf_green-16x16.tga"),
|
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
|
the_Ball : constant gel.Sprite.view
|
||||||
:= gel.Sprite.forge.new_Sprite (Name => "demo.Ball",
|
:= gel.Sprite.forge.new_Sprite (Name => "demo.Ball",
|
||||||
World => the_Applet.gui_World.all'Access,
|
World => the_Applet.gui_World.all'Access,
|
||||||
@@ -182,7 +182,7 @@ begin
|
|||||||
the_cone_Model : constant openGL.Model.any.view
|
the_cone_Model : constant openGL.Model.any.view
|
||||||
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("assets/gel/model/unit_cone.obj"),
|
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("assets/gel/model/unit_cone.obj"),
|
||||||
Texture => openGL.to_Asset ("assets/gel/Face1.bmp"),
|
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);
|
Texture_is_lucid => False);
|
||||||
|
|
||||||
the_cone_physics_Model : constant physics.Model.view
|
the_cone_physics_Model : constant physics.Model.view
|
||||||
@@ -198,7 +198,7 @@ begin
|
|||||||
the_cylinder_Model : constant openGL.Model.any.view
|
the_cylinder_Model : constant openGL.Model.any.view
|
||||||
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("assets/gel/model/unit_cylinder.obj"),
|
:= openGL.Model.any.new_Model (Model => openGL.to_Asset ("assets/gel/model/unit_cylinder.obj"),
|
||||||
Texture => openGL.to_Asset ("assets/gel/Face1.bmp"),
|
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);
|
Texture_is_lucid => False);
|
||||||
|
|
||||||
the_cylinder_physics_Model : constant physics.Model.view
|
the_cylinder_physics_Model : constant physics.Model.view
|
||||||
@@ -216,7 +216,7 @@ begin
|
|||||||
the_capsule_Model : constant openGL.Model.capsule.textured.view
|
the_capsule_Model : constant openGL.Model.capsule.textured.view
|
||||||
:= openGL.Model.capsule.textured.new_Capsule (Radius => 0.5,
|
:= openGL.Model.capsule.textured.new_Capsule (Radius => 0.5,
|
||||||
Height => 2.0,
|
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"));
|
Image => openGL.to_Asset ("assets/gel/Face1.bmp"));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ is
|
|||||||
then
|
then
|
||||||
the_graphics_Model := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius,
|
the_graphics_Model := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius,
|
||||||
Color => Color,
|
Color => Color,
|
||||||
texture_Details => openGL.texture_Set.to_Details ([1 => Texture]),
|
texture_Details => openGL.texture_Set.to_Set ([1 => Texture]),
|
||||||
Image => Texture).all'Access;
|
Image => Texture).all'Access;
|
||||||
else
|
else
|
||||||
the_graphics_Model := openGL.Model.circle.colored.new_circle (Radius,
|
the_graphics_Model := openGL.Model.circle.colored.new_circle (Radius,
|
||||||
@@ -164,13 +164,7 @@ is
|
|||||||
|
|
||||||
else
|
else
|
||||||
the_graphics_Model := openGL.Model.circle.lit_textured.new_Circle (Radius,
|
the_graphics_Model := openGL.Model.circle.lit_textured.new_Circle (Radius,
|
||||||
texture_Details => (Fades => [1 => 0.0, others => <>],
|
texture_Details => openGL.texture_Set.to_Set ([1 => Texture])).all'Access;
|
||||||
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;
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
return gel.Sprite.Forge.new_Sprite (Name,
|
return gel.Sprite.Forge.new_Sprite (Name,
|
||||||
@@ -221,13 +215,16 @@ is
|
|||||||
(Color, openGL.Opaque)).all'Access;
|
(Color, openGL.Opaque)).all'Access;
|
||||||
else
|
else
|
||||||
the_graphics_Model := openGL.Model.polygon.lit_textured.new_Polygon (vertex_Sites => openGL.Vector_2_array (Vertices),
|
the_graphics_Model := openGL.Model.polygon.lit_textured.new_Polygon (vertex_Sites => openGL.Vector_2_array (Vertices),
|
||||||
texture_Details => (Fades => [1 => 0.0, others => <>],
|
texture_Details => openGL.texture_Set.to_Set (texture_Assets => [1 => Texture],
|
||||||
Textures => [1 => Texture, others => <>],
|
texture_Tilings => texture_Tiling,
|
||||||
Objects => [others => <>],
|
Animation => null)).all'Access;
|
||||||
texture_Count => 1,
|
-- texture_Details => (Fades => [1 => 0.0, others => <>],
|
||||||
texture_Tilings => texture_Tiling,
|
-- Textures => [1 => Texture, others => <>],
|
||||||
texture_Applies => [others => True],
|
-- Objects => [others => <>],
|
||||||
Animation => null)).all'Access;
|
-- texture_Count => 1,
|
||||||
|
-- texture_Tilings => texture_Tiling,
|
||||||
|
-- texture_Applies => [others => True],
|
||||||
|
-- Animation => null)).all'Access;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
return gel.Sprite.Forge.new_Sprite (Name,
|
return gel.Sprite.Forge.new_Sprite (Name,
|
||||||
@@ -318,7 +315,7 @@ is
|
|||||||
the_graphics_Model := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius,
|
the_graphics_Model := openGL.Model.sphere.lit_colored_textured.new_Sphere (Radius,
|
||||||
lat_Count => lat_Count,
|
lat_Count => lat_Count,
|
||||||
long_Count => long_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;
|
Image => Texture).all'Access;
|
||||||
else
|
else
|
||||||
the_graphics_Model := openGL.Model.sphere.lit_colored.new_Sphere (Radius,
|
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,
|
the_graphics_Model := openGL.Model.sphere.textured.new_Sphere (Radius,
|
||||||
lat_Count => lat_Count,
|
lat_Count => lat_Count,
|
||||||
long_Count => long_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;
|
Image => Texture).all'Access;
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
@@ -371,7 +368,7 @@ is
|
|||||||
begin
|
begin
|
||||||
the_graphics_Model := openGL.Model.sphere.textured.new_Sphere (Radius,
|
the_graphics_Model := openGL.Model.sphere.textured.new_Sphere (Radius,
|
||||||
lat_Count => 180,
|
lat_Count => 180,
|
||||||
texture_Details => openGL.texture_Set.to_Details ([1 => Texture]),
|
texture_Details => openGL.texture_Set.to_Set ([1 => Texture]),
|
||||||
Image => Texture,
|
Image => Texture,
|
||||||
is_Skysphere => True).all'Access;
|
is_Skysphere => True).all'Access;
|
||||||
return gel.Sprite.Forge.new_Sprite ("skysphere_Sprite",
|
return gel.Sprite.Forge.new_Sprite ("skysphere_Sprite",
|
||||||
@@ -449,7 +446,7 @@ is
|
|||||||
Lower => (texture_Name => Texture),
|
Lower => (texture_Name => Texture),
|
||||||
Left => (texture_Name => Texture),
|
Left => (texture_Name => Texture),
|
||||||
Right => (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
|
the_box_physics_Model : constant physics.Model.view
|
||||||
:= physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube,
|
:= physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube,
|
||||||
half_Extents => Size / 2.0),
|
half_Extents => Size / 2.0),
|
||||||
@@ -486,7 +483,7 @@ is
|
|||||||
Height => Size (2)),
|
Height => Size (2)),
|
||||||
Plane => openGL.Model.Billboard.xy,
|
Plane => openGL.Model.Billboard.xy,
|
||||||
Texture => Texture,
|
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
|
the_billboard_physics_Model : constant physics.Model.view
|
||||||
:= physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube,
|
:= physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube,
|
||||||
@@ -527,7 +524,7 @@ is
|
|||||||
Plane => openGL.Model.Billboard.xy,
|
Plane => openGL.Model.Billboard.xy,
|
||||||
Texture => Texture,
|
Texture => Texture,
|
||||||
Color => Color,
|
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
|
the_billboard_physics_Model : constant physics.Model.view
|
||||||
:= physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube,
|
:= physics.Model.Forge.new_physics_Model (shape_Info => (Kind => physics.Model.Cube,
|
||||||
half_Extents => Size / 2.0),
|
half_Extents => Size / 2.0),
|
||||||
@@ -690,7 +687,7 @@ is
|
|||||||
:= openGL.Model.Text.lit_colored.new_Text (Text => Text,
|
:= openGL.Model.Text.lit_colored.new_Text (Text => Text,
|
||||||
Font => Font,
|
Font => Font,
|
||||||
Color => (Color, openGL.Opaque),
|
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);
|
Centered => True);
|
||||||
|
|
||||||
the_physics_Model : physics.Model.view;
|
the_physics_Model : physics.Model.view;
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ is
|
|||||||
Model => openGL.to_Asset ("assets/gel/collada/mh-human-dae.dae"),
|
Model => openGL.to_Asset ("assets/gel/collada/mh-human-dae.dae"),
|
||||||
-- model => gel.to_Asset ("assets/gel/collada/alfieri.dae"),
|
-- model => gel.to_Asset ("assets/gel/collada/alfieri.dae"),
|
||||||
Texture => openGL.null_Asset, -- gel.to_Asset ("assets/collada/gel-human-texture.tga"),
|
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);
|
Texture_is_lucid => False);
|
||||||
begin
|
begin
|
||||||
Self.bone_Sprites (the_Bone) := gel.Sprite.forge.new_Sprite (Name => sprite_Name,
|
Self.bone_Sprites (the_Bone) := gel.Sprite.forge.new_Sprite (Name => sprite_Name,
|
||||||
|
|||||||
@@ -705,7 +705,7 @@ is
|
|||||||
the_human_graphics_Model : aliased openGL.Model.any.view
|
the_human_graphics_Model : aliased openGL.Model.any.view
|
||||||
:= openGL.Model.any.new_Model (Model => to_Asset (model_Name.all),
|
:= 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 => 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);
|
Texture_is_lucid => False);
|
||||||
|
|
||||||
the_physics_Model : constant standard.physics.Model.view
|
the_physics_Model : constant standard.physics.Model.view
|
||||||
|
|||||||
Reference in New Issue
Block a user