opengl.model: Add basic texturing subprograms.
This commit is contained in:
@@ -80,6 +80,7 @@ begin
|
|||||||
|
|
||||||
the_Visuals (3).Site_is ([0.0, 0.0, -50.0]);
|
the_Visuals (3).Site_is ([0.0, 0.0, -50.0]);
|
||||||
|
|
||||||
|
|
||||||
-- Main loop.
|
-- Main loop.
|
||||||
--
|
--
|
||||||
while not Demo.Done
|
while not Demo.Done
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ is
|
|||||||
end destroy;
|
end destroy;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Models return openGL.Model.views
|
function Models return openGL.Model.views
|
||||||
is
|
is
|
||||||
use Model,
|
use Model,
|
||||||
@@ -260,37 +262,39 @@ 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_ground_Model.all'Access,
|
||||||
the_polygon_Model.all'Access,
|
the_polygon_Model.all'Access,
|
||||||
the_text_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,
|
||||||
the_ball_3_Model.all'Access,
|
the_ball_3_Model.all'Access,
|
||||||
|
|
||||||
the_billboard_Model.all'Access,
|
the_billboard_Model.all'Access,
|
||||||
the_colored_billboard_Model.all'Access,
|
the_colored_billboard_Model.all'Access,
|
||||||
the_box_1_Model.all'Access,
|
the_box_1_Model.all'Access,
|
||||||
the_box_2_Model.all'Access,
|
the_box_2_Model.all'Access,
|
||||||
the_box_3_Model.all'Access,
|
the_box_3_Model.all'Access,
|
||||||
|
|
||||||
the_capsule_Model.all'Access,
|
the_capsule_Model.all'Access,
|
||||||
the_grid_Model.all'Access,
|
the_grid_Model.all'Access,
|
||||||
|
|
||||||
the_hexagon_Model.all'Access,
|
the_hexagon_Model.all'Access,
|
||||||
the_textured_hexagon_Model.all'Access,
|
the_textured_hexagon_Model.all'Access,
|
||||||
|
|
||||||
the_faceted_hexagon_column_Model.all'Access,
|
the_faceted_hexagon_column_Model.all'Access,
|
||||||
the_rounded_hexagon_column_Model.all'Access,
|
the_rounded_hexagon_column_Model.all'Access,
|
||||||
|
|
||||||
the_line_Model.all'Access,
|
the_line_Model.all'Access,
|
||||||
the_collada_Model.all'Access,
|
the_collada_Model.all'Access,
|
||||||
the_wavefront_Model.all'Access,
|
the_wavefront_Model.all'Access,
|
||||||
|
|
||||||
the_segment_line_Model.all'Access];
|
the_segment_line_Model.all'Access];
|
||||||
end Models;
|
end Models;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure layout (the_Visuals : in Visual.views)
|
procedure layout (the_Visuals : in Visual.views)
|
||||||
is
|
is
|
||||||
initial_X : constant openGL.Real := -6.0;
|
initial_X : constant openGL.Real := -6.0;
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ is
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
overriding
|
overriding
|
||||||
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
|
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
|
||||||
Fonts : in Font.font_id_Map_of_font) return Geometry.views
|
Fonts : in Font.font_id_Map_of_font) return Geometry.views
|
||||||
@@ -146,11 +147,14 @@ is
|
|||||||
pragma unreferenced (Textures, Fonts);
|
pragma unreferenced (Textures, Fonts);
|
||||||
begin
|
begin
|
||||||
Self.build_GL_Geometries;
|
Self.build_GL_Geometries;
|
||||||
|
Self.Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
|
|
||||||
return [1 => Self.Geometry];
|
return [1 => Self.Geometry];
|
||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure build_GL_Geometries (Self : in out Item)
|
procedure build_GL_Geometries (Self : in out Item)
|
||||||
is
|
is
|
||||||
use Geometry;
|
use Geometry;
|
||||||
@@ -486,10 +490,52 @@ is
|
|||||||
end if;
|
end if;
|
||||||
|
|
||||||
Self.Geometry.is_Transparent (now => False);
|
Self.Geometry.is_Transparent (now => False);
|
||||||
Self.Geometry.Label_is (to_String (Self.Model) & "-" & to_String (Self.Texture));
|
Self.Geometry.Label_is (to_String (Self.Model) & "-" & to_String (Self.Texture));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end build_GL_Geometries;
|
end build_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.any;
|
end openGL.Model.any;
|
||||||
|
|||||||
@@ -39,6 +39,24 @@ is
|
|||||||
unsupported_model_Format : exception;
|
unsupported_model_Format : exception;
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,8 @@ is
|
|||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
the_Face.Model_is (Self.all'unchecked_Access);
|
||||||
|
|
||||||
return [1 => the_Face.all'Access];
|
return [1 => the_Face.all'Access];
|
||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
@@ -195,4 +197,47 @@ is
|
|||||||
end Image_is;
|
end Image_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.billboard.textured;
|
end openGL.Model.billboard.textured;
|
||||||
|
|||||||
@@ -46,6 +46,24 @@ is
|
|||||||
procedure Image_is (Self : in out Item; Now : in lucid_Image);
|
procedure Image_is (Self : in out Item; Now : in lucid_Image);
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,9 @@ is
|
|||||||
|
|
||||||
if Self.Faces (Front).texture_Name /= null_Asset
|
if Self.Faces (Front).texture_Name /= null_Asset
|
||||||
then
|
then
|
||||||
front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
front_Face.is_Transparent (now => front_Face.Texture.is_Transparent);
|
front_Face.is_Transparent (now => front_Face.Texture.is_Transparent);
|
||||||
|
front_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -93,8 +94,9 @@ is
|
|||||||
|
|
||||||
if Self.Faces (Rear).texture_Name /= null_Asset
|
if Self.Faces (Rear).texture_Name /= null_Asset
|
||||||
then
|
then
|
||||||
rear_Face.Texture_is (Textures.fetch (Self.Faces (Rear).texture_Name));
|
rear_Face.Texture_is (Textures.fetch (Self.Faces (Rear).texture_Name));
|
||||||
rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent);
|
rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent);
|
||||||
|
rear_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -112,8 +114,9 @@ is
|
|||||||
|
|
||||||
if Self.Faces (Upper).texture_Name /= null_Asset
|
if Self.Faces (Upper).texture_Name /= null_Asset
|
||||||
then
|
then
|
||||||
upper_Face.Texture_is (Textures.fetch (Self.Faces (Upper).texture_Name));
|
upper_Face.Texture_is (Textures.fetch (Self.Faces (Upper).texture_Name));
|
||||||
upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent);
|
upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent);
|
||||||
|
upper_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -133,6 +136,7 @@ is
|
|||||||
then
|
then
|
||||||
lower_Face.Texture_is (Textures.fetch (Self.Faces (Lower).texture_Name));
|
lower_Face.Texture_is (Textures.fetch (Self.Faces (Lower).texture_Name));
|
||||||
lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent);
|
lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent);
|
||||||
|
lower_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -150,8 +154,9 @@ is
|
|||||||
|
|
||||||
if Self.Faces (Left).texture_Name /= null_Asset
|
if Self.Faces (Left).texture_Name /= null_Asset
|
||||||
then
|
then
|
||||||
left_Face.Texture_is (Textures.fetch (Self.Faces (Left).texture_Name));
|
left_Face.Texture_is (Textures.fetch (Self.Faces (Left).texture_Name));
|
||||||
left_Face.is_Transparent (now => left_Face.Texture.is_Transparent);
|
left_Face.is_Transparent (now => left_Face.Texture.is_Transparent);
|
||||||
|
left_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -169,8 +174,9 @@ is
|
|||||||
|
|
||||||
if Self.Faces (Right).texture_Name /= null_Asset
|
if Self.Faces (Right).texture_Name /= null_Asset
|
||||||
then
|
then
|
||||||
right_Face.Texture_is (Textures.fetch (Self.Faces (Right).texture_Name));
|
right_Face.Texture_is (Textures.fetch (Self.Faces (Right).texture_Name));
|
||||||
right_Face.is_Transparent (now => right_Face.Texture.is_Transparent);
|
right_Face.is_Transparent (now => right_Face.Texture.is_Transparent);
|
||||||
|
right_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -184,4 +190,48 @@ is
|
|||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.box.lit_textured;
|
end openGL.Model.box.lit_textured;
|
||||||
|
|||||||
@@ -39,6 +39,25 @@ is
|
|||||||
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.box.item with
|
type Item is new Model.box.item with
|
||||||
|
|||||||
@@ -81,8 +81,9 @@ is
|
|||||||
|
|
||||||
if Self.Faces (Front).texture_Name /= null_Asset
|
if Self.Faces (Front).texture_Name /= null_Asset
|
||||||
then
|
then
|
||||||
front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
front_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
front_Face.is_Transparent (now => front_Face.Texture.is_Transparent);
|
front_Face.is_Transparent (now => front_Face.Texture.is_Transparent);
|
||||||
|
front_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -102,6 +103,7 @@ is
|
|||||||
then
|
then
|
||||||
rear_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
rear_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent);
|
rear_Face.is_Transparent (now => rear_Face.Texture.is_Transparent);
|
||||||
|
rear_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -121,6 +123,7 @@ is
|
|||||||
then
|
then
|
||||||
upper_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
upper_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent);
|
upper_Face.is_Transparent (now => upper_Face.Texture.is_Transparent);
|
||||||
|
upper_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -140,6 +143,7 @@ is
|
|||||||
then
|
then
|
||||||
lower_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
lower_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent);
|
lower_Face.is_Transparent (now => lower_Face.Texture.is_Transparent);
|
||||||
|
lower_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -159,6 +163,7 @@ is
|
|||||||
then
|
then
|
||||||
left_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
left_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
left_Face.is_Transparent (now => left_Face.Texture.is_Transparent);
|
left_Face.is_Transparent (now => left_Face.Texture.is_Transparent);
|
||||||
|
left_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -178,6 +183,7 @@ is
|
|||||||
then
|
then
|
||||||
right_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
right_Face.Texture_is (Textures.fetch (Self.Faces (Front).texture_Name));
|
||||||
right_Face.is_Transparent (now => right_Face.Texture.is_Transparent);
|
right_Face.is_Transparent (now => right_Face.Texture.is_Transparent);
|
||||||
|
right_Face.Model_is (Self.all'unchecked_Access);
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -191,4 +197,46 @@ is
|
|||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.box.textured;
|
end openGL.Model.box.textured;
|
||||||
|
|||||||
@@ -40,6 +40,24 @@ is
|
|||||||
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
|
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
|
||||||
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -190,6 +190,8 @@ is
|
|||||||
begin
|
begin
|
||||||
the_shaft_Geometry.add (Primitive.view (the_Primitive));
|
the_shaft_Geometry.add (Primitive.view (the_Primitive));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
the_shaft_Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -386,6 +388,8 @@ is
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
cap_Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
|
|
||||||
return cap_Geometry;
|
return cap_Geometry;
|
||||||
end new_Cap;
|
end new_Cap;
|
||||||
|
|
||||||
@@ -400,4 +404,45 @@ is
|
|||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.capsule.lit_textured;
|
end openGL.Model.capsule.lit_textured;
|
||||||
|
|||||||
@@ -28,6 +28,24 @@ is
|
|||||||
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ is
|
|||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
the_Geometry.is_Transparent (True); -- TODO: Do transparency properly.
|
the_Geometry.is_Transparent (True); -- TODO: Do transparency properly.
|
||||||
|
the_Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
|
|
||||||
return the_Geometry;
|
return the_Geometry;
|
||||||
end new_Face;
|
end new_Face;
|
||||||
@@ -138,8 +139,6 @@ is
|
|||||||
upper_Face := new_Face (Vertices => the_Vertices);
|
upper_Face := new_Face (Vertices => the_Vertices);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
upper_Face.Model_is (Self.all'unchecked_Access);
|
|
||||||
|
|
||||||
return (1 => upper_Face.all'Access);
|
return (1 => upper_Face.all'Access);
|
||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|||||||
@@ -186,8 +186,53 @@ is
|
|||||||
the_Geometry.add (Primitive.view (the_Primitive));
|
the_Geometry.add (Primitive.view (the_Primitive));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
the_Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
|
|
||||||
return [1 => Geometry.view (the_Geometry)];
|
return [1 => Geometry.view (the_Geometry)];
|
||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
Self.Image := Now;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.sphere.lit_textured;
|
end openGL.Model.sphere.lit_textured;
|
||||||
|
|||||||
@@ -25,10 +25,28 @@ is
|
|||||||
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.sphere.item with -- TODO: Add 'Color' component.
|
type Item is new Model.sphere.item with
|
||||||
record
|
record
|
||||||
Image : asset_Name := null_Asset;
|
Image : asset_Name := null_Asset;
|
||||||
end record;
|
end record;
|
||||||
|
|||||||
@@ -226,6 +226,8 @@ is
|
|||||||
the_Geometry.add (Primitive.view (the_Primitive));
|
the_Geometry.add (Primitive.view (the_Primitive));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
the_Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
|
|
||||||
return [1 => Geometry.view (the_Geometry)];
|
return [1 => Geometry.view (the_Geometry)];
|
||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
@@ -282,4 +284,45 @@ is
|
|||||||
end set_Bounds;
|
end set_Bounds;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
Self.color_Map := Now;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.terrain;
|
end openGL.Model.terrain;
|
||||||
|
|||||||
@@ -37,6 +37,25 @@ is
|
|||||||
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
type Item is new Model.item with
|
type Item is new Model.item with
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ is
|
|||||||
the_Geometry.add (Primitive.view (the_Primitive));
|
the_Geometry.add (Primitive.view (the_Primitive));
|
||||||
the_Geometry.Vertices_are (the_Vertices);
|
the_Geometry.Vertices_are (the_Vertices);
|
||||||
the_Geometry.Texture_is (Texture.Forge.to_Texture (Self.Font.gl_Texture));
|
the_Geometry.Texture_is (Texture.Forge.to_Texture (Self.Font.gl_Texture));
|
||||||
|
the_Geometry.Model_is (Self.all'unchecked_Access);
|
||||||
the_Geometry.is_Transparent;
|
the_Geometry.is_Transparent;
|
||||||
|
|
||||||
return [1 => Geometry.view (the_Geometry)];
|
return [1 => Geometry.view (the_Geometry)];
|
||||||
@@ -286,4 +287,46 @@ is
|
|||||||
end to_GL_Geometries;
|
end to_GL_Geometries;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Fade_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 0.0;
|
||||||
|
end Fade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in openGL.asset_Name)
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
null;
|
||||||
|
end Texture_is;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
return 1;
|
||||||
|
end texture_Count;
|
||||||
|
|
||||||
|
|
||||||
end openGL.Model.Text.lit_colored;
|
end openGL.Model.Text.lit_colored;
|
||||||
|
|||||||
@@ -38,6 +38,24 @@ is
|
|||||||
function Font (Self : in Item) return openGL.Font.view;
|
function Font (Self : in Item) return openGL.Font.view;
|
||||||
|
|
||||||
|
|
||||||
|
------------
|
||||||
|
-- Texturing
|
||||||
|
--
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function Fade (Self : in Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level;
|
||||||
|
|
||||||
|
overriding
|
||||||
|
procedure Fade_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in texture_Set.fade_Level);
|
||||||
|
|
||||||
|
procedure Texture_is (Self : in out Item; Which : in texture_Set.texture_Id;
|
||||||
|
Now : in asset_Name);
|
||||||
|
|
||||||
|
overriding
|
||||||
|
function texture_Count (Self : in Item) return Natural;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user