opengl: Revamp texturing.
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
uniform int texture_Count;
|
uniform int texture_Count;
|
||||||
uniform sampler2D Textures [16];
|
uniform sampler2D Textures [16];
|
||||||
uniform float Fade [16];
|
uniform float Fade [16];
|
||||||
|
uniform bool texture_Applies [16];
|
||||||
|
|
||||||
vec4
|
vec4
|
||||||
apply_Texturing (vec2 Coords)
|
apply_Texturing (vec2 Coords)
|
||||||
@@ -14,6 +15,8 @@ apply_Texturing (vec2 Coords)
|
|||||||
vec4 Color = vec4 (0);
|
vec4 Color = vec4 (0);
|
||||||
|
|
||||||
for (int i = 0; i < texture_Count; ++i)
|
for (int i = 0; i < texture_Count; ++i)
|
||||||
|
{
|
||||||
|
if (texture_Applies [i])
|
||||||
{
|
{
|
||||||
Color.rgb += texture (Textures [i], Coords).rgb
|
Color.rgb += texture (Textures [i], Coords).rgb
|
||||||
* texture (Textures [i], Coords).a
|
* texture (Textures [i], Coords).a
|
||||||
@@ -22,6 +25,7 @@ apply_Texturing (vec2 Coords)
|
|||||||
Color.a = max (Color.a, texture (Textures [i],
|
Color.a = max (Color.a, texture (Textures [i],
|
||||||
Coords).a);
|
Coords).a);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Color;
|
return Color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
with openGL.Model.texturing;
|
||||||
with openGL.texture_Set;
|
with openGL.texture_Set;
|
||||||
with
|
with
|
||||||
openGL.Palette,
|
openGL.Palette,
|
||||||
@@ -151,20 +152,26 @@ is
|
|||||||
:= Model.sphere.lit_colored.new_Sphere (Radius => 1.0, Color => (Green, Opaque));
|
:= Model.sphere.lit_colored.new_Sphere (Radius => 1.0, Color => (Green, Opaque));
|
||||||
|
|
||||||
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, Image => the_Texture);
|
:= Model.sphere.lit_textured.new_Sphere (Radius => 1.0,
|
||||||
|
texture_Details => texture_Set.to_Details ([1 => 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, Image => the_Texture);
|
:= Model.sphere.lit_colored_textured.new_Sphere (Radius => 1.0,
|
||||||
|
texture_Details => texture_Set.to_Details ([1 => 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 => 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]));
|
||||||
use Model.box;
|
use Model.box;
|
||||||
|
|
||||||
the_box_1_Model : constant Model.box.colored.view
|
the_box_1_Model : constant Model.box.colored.view
|
||||||
@@ -180,16 +187,20 @@ is
|
|||||||
the_box_2_Model : constant Model.box.lit_textured.view
|
the_box_2_Model : constant Model.box.lit_textured.view
|
||||||
:= 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]));
|
||||||
|
|
||||||
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]));
|
||||||
|
|
||||||
|
|
||||||
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]),
|
||||||
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
|
||||||
@@ -248,6 +259,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_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
|
||||||
@@ -256,12 +268,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_Details ([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]),
|
||||||
Centered => True);
|
Centered => True);
|
||||||
|
|
||||||
the_segment_line_Model : constant Model.segment_line.view
|
the_segment_line_Model : constant Model.segment_line.view
|
||||||
@@ -282,6 +295,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]),
|
||||||
Tiling => Tiling);
|
Tiling => Tiling);
|
||||||
begin
|
begin
|
||||||
Demo.Renderer.add_Font (the_font_Id);
|
Demo.Renderer.add_Font (the_font_Id);
|
||||||
@@ -292,10 +306,10 @@ is
|
|||||||
the_segment_line_Model.add_Segment (end_Site => [2.0, 2.0, 0.0]);
|
the_segment_line_Model.add_Segment (end_Site => [2.0, 2.0, 0.0]);
|
||||||
the_segment_line_Model.add_Segment (end_Site => [0.0, 2.0, 0.0]);
|
the_segment_line_Model.add_Segment (end_Site => [0.0, 2.0, 0.0]);
|
||||||
|
|
||||||
return [ the_ground_Model.all'Access,
|
return [ the_text_Model.all'Access,
|
||||||
|
the_ground_Model.all'Access,
|
||||||
the_lit_textured_polygon_Model.all'Access,
|
the_lit_textured_polygon_Model.all'Access,
|
||||||
the_lit_colored_polygon_Model.all'Access,
|
the_lit_colored_polygon_Model.all'Access,
|
||||||
the_text_Model.all'Access,
|
|
||||||
the_arrow_Model.all'Access,
|
the_arrow_Model.all'Access,
|
||||||
the_ball_1_Model.all'Access,
|
the_ball_1_Model.all'Access,
|
||||||
the_ball_2_Model.all'Access,
|
the_ball_2_Model.all'Access,
|
||||||
|
|||||||
@@ -31,29 +31,34 @@ 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_is_lucid : in Boolean) return openGL.Model.any.item
|
Texture_is_lucid : in Boolean) return openGL.Model.any.item
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return Self : openGL.Model.any.item := (openGL.Model.item with
|
-- return Self : openGL.Model.any. := (openGL.Model.item with
|
||||||
|
return Self : openGL.Model.any.item := (textured_Model.textured_item with
|
||||||
Model,
|
Model,
|
||||||
Texture,
|
Texture,
|
||||||
Texture_is_lucid,
|
Texture_is_lucid,
|
||||||
Geometry => null)
|
Geometry => null)
|
||||||
do
|
do
|
||||||
Self.Bounds.Ball := 1.0;
|
Self.Bounds.Ball := 1.0;
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
end return;
|
end return;
|
||||||
end to_Model;
|
end to_Model;
|
||||||
|
|
||||||
|
|
||||||
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_is_lucid : in Boolean) return openGL.Model.any.view
|
Texture_is_lucid : in Boolean) return openGL.Model.any.view
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
return new openGL.Model.any.item' (to_Model (Model, Texture, Texture_is_lucid));
|
return new openGL.Model.any.item' (to_Model (Model, Texture, texture_Details, Texture_is_lucid));
|
||||||
end new_Model;
|
end new_Model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
--- Attributes
|
--- Attributes
|
||||||
--
|
--
|
||||||
@@ -501,40 +506,40 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
with
|
with
|
||||||
openGL.Geometry;
|
openGL.Geometry,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.any
|
package openGL.Model.any
|
||||||
@@ -9,7 +10,11 @@ package openGL.Model.any
|
|||||||
-- This model is largely used by the IO importers of various model formats (ie collada, wavefront, etc).
|
-- This model is largely used by the IO importers of various model formats (ie collada, wavefront, etc).
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
|
||||||
|
-- type Item is new Model.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -19,6 +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_is_lucid : in Boolean) return openGL.Model.any.view;
|
Texture_is_lucid : in Boolean) return openGL.Model.any.view;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
@@ -43,24 +49,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.item with
|
-- type Item is new Model.item with
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Model : asset_Name := null_Asset; -- A wavefront '.obj' or collada '.dae' file. -- TODO: Rename to 'model_Name'.
|
Model : asset_Name := null_Asset; -- A wavefront '.obj' or collada '.dae' file. -- TODO: Rename to 'model_Name'.
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +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;
|
||||||
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);
|
||||||
@@ -25,6 +26,8 @@ is
|
|||||||
Self.Texture_Name := Texture;
|
Self.Texture_Name := Texture;
|
||||||
Self.define (Size);
|
Self.define (Size);
|
||||||
|
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end new_Billboard;
|
end new_Billboard;
|
||||||
end Forge;
|
end Forge;
|
||||||
@@ -202,41 +205,41 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
with
|
with
|
||||||
openGL.Geometry,
|
openGL.Geometry,
|
||||||
openGL.Texture;
|
openGL.Texture,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.billboard.textured
|
package openGL.Model.billboard.textured
|
||||||
@@ -8,7 +9,10 @@ package openGL.Model.billboard.textured
|
|||||||
-- Models a textured billboard.
|
-- Models a textured billboard.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item (Lucid : Boolean) is new Model.billboard.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.billboard.item);
|
||||||
|
|
||||||
|
type Item (Lucid : Boolean) is new textured_Model.textured_item with private;
|
||||||
|
-- type Item (Lucid : Boolean) is new Model.billboard.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
type Image_view is access Image;
|
type Image_view is access Image;
|
||||||
@@ -24,6 +28,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;
|
||||||
Lucid : in Boolean := False) return View;
|
Lucid : in Boolean := False) return View;
|
||||||
end Forge;
|
end Forge;
|
||||||
|
|
||||||
@@ -50,24 +55,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item (Lucid : Boolean) is new Model.billboard.item with
|
-- type Item (Lucid : Boolean) is new Model.billboard.item with
|
||||||
|
type Item (Lucid : Boolean) is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
texture_Name : asset_Name := null_Asset;
|
texture_Name : asset_Name := null_Asset;
|
||||||
Texture : openGL.Texture.Object := openGL.Texture.null_Object; -- The texture to be applied to the billboard face.
|
Texture : openGL.Texture.Object := openGL.Texture.null_Object; -- The texture to be applied to the billboard face.
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_Box (Size : in Vector_3;
|
function new_Box (Size : in Vector_3;
|
||||||
Faces : in lit_textured.Faces) return View
|
Faces : in lit_textured.Faces;
|
||||||
|
texture_Details : in texture_Set.Details) return View
|
||||||
is
|
is
|
||||||
Self : constant View := new Item;
|
Self : constant View := new Item;
|
||||||
begin
|
begin
|
||||||
Self.Faces := Faces;
|
Self.Faces := Faces;
|
||||||
Self.Size := Size;
|
Self.Size := Size;
|
||||||
|
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end new_Box;
|
end new_Box;
|
||||||
|
|
||||||
@@ -196,41 +199,41 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
with
|
with
|
||||||
openGL.Geometry,
|
openGL.Geometry,
|
||||||
openGL.Font;
|
openGL.Font,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.Box.lit_textured
|
package openGL.Model.Box.lit_textured
|
||||||
@@ -10,7 +11,10 @@ package openGL.Model.Box.lit_textured
|
|||||||
-- Each face may have a separate texture.
|
-- Each face may have a separate texture.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.box.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.box.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
-- type Item is new Model.box.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +31,8 @@ is
|
|||||||
--
|
--
|
||||||
|
|
||||||
function new_Box (Size : in Vector_3;
|
function new_Box (Size : in Vector_3;
|
||||||
Faces : in lit_textured.Faces) return View;
|
Faces : in lit_textured.Faces;
|
||||||
|
texture_Details : in texture_Set.Details) return View;
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
@@ -43,24 +48,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.box.item with
|
-- type Item is new Model.box.item with
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Faces : lit_textured.Faces;
|
Faces : lit_textured.Faces;
|
||||||
end record;
|
end record;
|
||||||
|
|||||||
@@ -11,6 +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;
|
||||||
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;
|
||||||
@@ -19,6 +20,8 @@ is
|
|||||||
Self.is_Skybox := is_Skybox;
|
Self.is_Skybox := is_Skybox;
|
||||||
Self.Size := Size;
|
Self.Size := Size;
|
||||||
|
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end new_Box;
|
end new_Box;
|
||||||
|
|
||||||
@@ -203,40 +206,40 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.box.textured;
|
end openGL.Model.box.textured;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
with
|
with
|
||||||
openGL.Geometry,
|
openGL.Geometry,
|
||||||
openGL.Font,
|
openGL.Font,
|
||||||
openGL.Texture;
|
openGL.Texture,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.Box.textured
|
package openGL.Model.Box.textured
|
||||||
@@ -11,7 +12,10 @@ package openGL.Model.Box.textured
|
|||||||
-- Each face may have a separate texture.
|
-- Each face may have a separate texture.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.box.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.box.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
-- type Item is new Model.box.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -29,6 +33,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;
|
||||||
is_Skybox : in Boolean := False) return View;
|
is_Skybox : in Boolean := False) return View;
|
||||||
|
|
||||||
|
|
||||||
@@ -44,24 +49,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.box.item with
|
-- type Item is new Model.box.item with
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Faces : textured.Faces;
|
Faces : textured.Faces;
|
||||||
is_Skybox : Boolean := False;
|
is_Skybox : Boolean := False;
|
||||||
|
|||||||
@@ -13,6 +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;
|
||||||
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,6 +22,8 @@ is
|
|||||||
Self.Height := Height;
|
Self.Height := Height;
|
||||||
Self.Image := Image;
|
Self.Image := Image;
|
||||||
|
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end new_Capsule;
|
end new_Capsule;
|
||||||
|
|
||||||
@@ -409,40 +412,40 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.capsule.lit_textured;
|
end openGL.Model.capsule.lit_textured;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
with
|
with
|
||||||
openGL.Geometry;
|
openGL.Geometry,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.capsule.lit_textured
|
package openGL.Model.capsule.lit_textured
|
||||||
@@ -7,7 +8,10 @@ package openGL.Model.capsule.lit_textured
|
|||||||
-- Models a lit and textured capsule.
|
-- Models a lit and textured capsule.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.capsule.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.capsule.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
-- type Item is new Model.capsule.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -17,6 +21,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;
|
||||||
Image : in asset_Name := null_Asset) return View;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
@@ -32,24 +37,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.capsule.item with
|
-- type Item is new Model.capsule.item with
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Radius : Real;
|
Radius : Real;
|
||||||
Height : Real;
|
Height : Real;
|
||||||
|
|||||||
@@ -15,6 +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;
|
||||||
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;
|
||||||
@@ -26,6 +27,8 @@ is
|
|||||||
Self.Color := Color;
|
Self.Color := Color;
|
||||||
Self.Image := Image;
|
Self.Image := Image;
|
||||||
|
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end new_Sphere;
|
end new_Sphere;
|
||||||
|
|
||||||
@@ -210,40 +213,40 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
Self.Image := Now;
|
-- Self.Image := Now;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.sphere.lit_colored_textured;
|
end openGL.Model.sphere.lit_colored_textured;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
with
|
with
|
||||||
openGL.Font,
|
openGL.Font,
|
||||||
openGL.Palette,
|
openGL.Palette,
|
||||||
openGL.Geometry;
|
openGL.Geometry,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.sphere.lit_colored_textured
|
package openGL.Model.sphere.lit_colored_textured
|
||||||
@@ -9,7 +10,10 @@ package openGL.Model.sphere.lit_colored_textured
|
|||||||
-- Models a lit, colored, textured sphere.
|
-- Models a lit, colored, textured sphere.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.sphere.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.sphere.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
-- type Item is new Model.sphere.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -18,6 +22,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;
|
||||||
Image : in asset_Name := null_Asset) return View;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
|
|
||||||
@@ -30,24 +35,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.sphere.item with -- TODO: Add 'Color' component.
|
-- type Item is new Model.sphere.item with -- TODO: Add 'Color' component.
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Color : openGL.lucid_Color;
|
Color : openGL.lucid_Color;
|
||||||
Image : asset_Name := null_Asset; -- Usually a mercator projection to be mapped onto the sphere.
|
Image : asset_Name := null_Asset; -- Usually a mercator projection to be mapped onto the sphere.
|
||||||
|
|||||||
@@ -12,6 +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;
|
||||||
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,6 +22,7 @@ is
|
|||||||
Self.lat_Count := lat_Count;
|
Self.lat_Count := lat_Count;
|
||||||
Self.long_Count := long_Count;
|
Self.long_Count := long_Count;
|
||||||
Self.Image := Image;
|
Self.Image := Image;
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end new_Sphere;
|
end new_Sphere;
|
||||||
@@ -198,40 +200,40 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
Self.Image := Now;
|
-- Self.Image := Now;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
with
|
with
|
||||||
openGL.Font,
|
openGL.Font,
|
||||||
openGL.Geometry;
|
openGL.Geometry,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.sphere.lit_textured
|
package openGL.Model.sphere.lit_textured
|
||||||
@@ -10,13 +11,18 @@ package openGL.Model.sphere.lit_textured
|
|||||||
-- The texture is often a mercator projection to be mapped onto the sphere.
|
-- The texture is often a mercator projection to be mapped onto the sphere.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.sphere.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.sphere.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
|
||||||
|
-- type Item is new Model.sphere.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
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;
|
||||||
Image : in asset_Name := null_Asset) return View;
|
Image : in asset_Name := null_Asset) return View;
|
||||||
|
|
||||||
|
|
||||||
@@ -29,24 +35,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.sphere.item with
|
-- type Item is new Model.sphere.item with
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Image : asset_Name := null_Asset; -- Usually a mercator projection to be mapped onto the sphere.
|
Image : asset_Name := null_Asset; -- Usually a mercator projection to be mapped onto the sphere.
|
||||||
end record;
|
end record;
|
||||||
|
|||||||
@@ -19,10 +19,11 @@ 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;
|
||||||
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
|
||||||
the_Model : constant View := new Item' (Model.item with
|
the_Model : constant View := new Item' (textured_Model.textured_item with
|
||||||
heights_Asset => heights_Asset,
|
heights_Asset => heights_Asset,
|
||||||
Heights => Heights,
|
Heights => Heights,
|
||||||
Row => Row,
|
Row => Row,
|
||||||
@@ -31,6 +32,7 @@ is
|
|||||||
tiling => Tiling);
|
tiling => Tiling);
|
||||||
begin
|
begin
|
||||||
the_Model.set_Bounds;
|
the_Model.set_Bounds;
|
||||||
|
the_Model.texture_Details_is (texture_Details);
|
||||||
return the_Model;
|
return the_Model;
|
||||||
end new_Terrain;
|
end new_Terrain;
|
||||||
|
|
||||||
@@ -289,40 +291,40 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
Self.color_Map := Now;
|
-- Self.color_Map := Now;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.terrain;
|
end openGL.Model.terrain;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
with
|
with
|
||||||
openGL.Geometry;
|
openGL.Geometry,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.terrain
|
package openGL.Model.terrain
|
||||||
@@ -7,7 +8,9 @@ package openGL.Model.terrain
|
|||||||
-- Models lit, textured terrain.
|
-- Models lit, textured terrain.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -22,6 +25,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;
|
||||||
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
|
||||||
@@ -41,24 +45,24 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.item with
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
heights_Asset : asset_Name := null_Asset;
|
heights_Asset : asset_Name := null_Asset;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +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;
|
||||||
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);
|
||||||
@@ -35,6 +36,8 @@ is
|
|||||||
Self.Centered := Centered;
|
Self.Centered := Centered;
|
||||||
Self.Bounds := null_Bounds;
|
Self.Bounds := null_Bounds;
|
||||||
|
|
||||||
|
Self.texture_Details_is (texture_Details);
|
||||||
|
|
||||||
return Self;
|
return Self;
|
||||||
end;
|
end;
|
||||||
end new_Text;
|
end new_Text;
|
||||||
@@ -292,41 +295,41 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level)
|
-- Now : in texture_Set.fade_Level)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Fade_is;
|
-- end Fade_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 0.0;
|
-- return 0.0;
|
||||||
end Fade;
|
-- end Fade;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in openGL.asset_Name)
|
-- Now : in openGL.asset_Name)
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
null;
|
-- null;
|
||||||
end Texture_is;
|
-- end Texture_is;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural
|
-- function texture_Count (Self : in Item) return Natural
|
||||||
is
|
-- is
|
||||||
begin
|
-- begin
|
||||||
return 1;
|
-- return 1;
|
||||||
end texture_Count;
|
-- end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.Text.lit_colored;
|
end openGL.Model.Text.lit_colored;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
with
|
with
|
||||||
openGL.Font.texture,
|
openGL.Font.texture,
|
||||||
openGL.Geometry;
|
openGL.Geometry,
|
||||||
|
openGL.Model.texturing;
|
||||||
|
|
||||||
|
|
||||||
package openGL.Model.Text.lit_colored
|
package openGL.Model.Text.lit_colored
|
||||||
@@ -8,7 +9,10 @@ package openGL.Model.Text.lit_colored
|
|||||||
-- Models lit and colored text.
|
-- Models lit and colored text.
|
||||||
--
|
--
|
||||||
is
|
is
|
||||||
type Item is new Model.text.item with private;
|
package textured_Model is new texturing.Mixin (openGL.Model.text.item);
|
||||||
|
|
||||||
|
type Item is new textured_Model.textured_item with private;
|
||||||
|
-- type Item is new Model.text.item with private;
|
||||||
type View is access all Item'Class;
|
type View is access all Item'Class;
|
||||||
|
|
||||||
|
|
||||||
@@ -19,6 +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;
|
||||||
Centered : in Boolean := True) return View;
|
Centered : in Boolean := True) return View;
|
||||||
|
|
||||||
|
|
||||||
@@ -42,24 +47,25 @@ is
|
|||||||
-- Texturing
|
-- Texturing
|
||||||
--
|
--
|
||||||
|
|
||||||
overriding
|
-- overriding
|
||||||
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
-- function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in texture_Set.fade_Level);
|
-- Now : in texture_Set.fade_Level);
|
||||||
|
--
|
||||||
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
-- procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
Now : in asset_Name);
|
-- Now : in asset_Name);
|
||||||
|
--
|
||||||
overriding
|
-- overriding
|
||||||
function texture_Count (Self : in Item) return Natural;
|
-- function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.text.item with
|
-- type Item is new Model.text.item with
|
||||||
|
type Item is new textured_Model.textured_item with
|
||||||
record
|
record
|
||||||
Text : String_view;
|
Text : String_view;
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ is
|
|||||||
|
|
||||||
no_such_Font : exception;
|
no_such_Font : exception;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Applied (Self : in Item; Which : in texture_Set.texture_Id) return Boolean
|
||||||
|
is (True);
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
with
|
with
|
||||||
openGL.Camera,
|
openGL.Camera,
|
||||||
openGL.Model.billboard.textured,
|
openGL.Model.billboard.textured,
|
||||||
|
openGL.texture_Set,
|
||||||
|
|
||||||
ada.unchecked_Deallocation;
|
ada.unchecked_Deallocation;
|
||||||
|
|
||||||
@@ -82,7 +83,8 @@ is
|
|||||||
Self.Visual.Model_is (Model.billboard.textured.Forge.new_Billboard (Size => (Width => Width,
|
Self.Visual.Model_is (Model.billboard.textured.Forge.new_Billboard (Size => (Width => Width,
|
||||||
Height => Height),
|
Height => Height),
|
||||||
Plane => Model.billboard.xy,
|
Plane => Model.billboard.xy,
|
||||||
Texture => null_Asset).all'Access);
|
Texture => null_Asset,
|
||||||
|
texture_Details => texture_Set.to_Details ([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;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ with
|
|||||||
|
|
||||||
interfaces.C.Strings;
|
interfaces.C.Strings;
|
||||||
|
|
||||||
-- use ada.Text_IO;
|
use ada.Text_IO;
|
||||||
|
|
||||||
|
|
||||||
package body openGL.Shader
|
package body openGL.Shader
|
||||||
@@ -113,7 +113,7 @@ is
|
|||||||
Status'unchecked_Access);
|
Status'unchecked_Access);
|
||||||
if Status = 0
|
if Status = 0
|
||||||
and Debugging
|
and Debugging
|
||||||
and False
|
-- and False
|
||||||
then
|
then
|
||||||
declare
|
declare
|
||||||
use ada.Text_IO;
|
use ada.Text_IO;
|
||||||
@@ -137,6 +137,9 @@ is
|
|||||||
is
|
is
|
||||||
the_Source : aliased constant C.char_array := to_C_char_array (shader_Filename);
|
the_Source : aliased constant C.char_array := to_C_char_array (shader_Filename);
|
||||||
begin
|
begin
|
||||||
|
put_Line ("SHADER NAME: " & shader_Filename);
|
||||||
|
put_Line (interfaces.C.to_Ada (the_Source));
|
||||||
|
|
||||||
create_Shader (Self, Kind, the_Source);
|
create_Shader (Self, Kind, the_Source);
|
||||||
end define;
|
end define;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ with
|
|||||||
openGL.Model.line .colored,
|
openGL.Model.line .colored,
|
||||||
openGL.Model.segment_line,
|
openGL.Model.segment_line,
|
||||||
|
|
||||||
|
openGL.texture_Set,
|
||||||
|
|
||||||
physics.Model,
|
physics.Model,
|
||||||
gel.Window;
|
gel.Window;
|
||||||
-- float_Math.Random;
|
-- float_Math.Random;
|
||||||
@@ -155,6 +157,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]),
|
||||||
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,
|
||||||
@@ -307,6 +310,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]),
|
||||||
Image => Texture).all'Access;
|
Image => Texture).all'Access;
|
||||||
else
|
else
|
||||||
if Color /= openGL.no_lucid_Color
|
if Color /= openGL.no_lucid_Color
|
||||||
@@ -422,7 +426,8 @@ is
|
|||||||
Upper => (texture_Name => Texture),
|
Upper => (texture_Name => Texture),
|
||||||
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]));
|
||||||
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),
|
||||||
@@ -456,7 +461,8 @@ is
|
|||||||
:= openGL.Model.billboard.textured.forge.new_Billboard (Size => (Width => Size (1),
|
:= openGL.Model.billboard.textured.forge.new_Billboard (Size => (Width => Size (1),
|
||||||
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]));
|
||||||
|
|
||||||
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,
|
||||||
@@ -640,6 +646,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 => openGL.null_Asset]),
|
||||||
Centered => Centered);
|
Centered => Centered);
|
||||||
the_physics_Model : physics.Model.view;
|
the_physics_Model : physics.Model.view;
|
||||||
begin
|
begin
|
||||||
|
|||||||
Reference in New Issue
Block a user