opengl: Revamp multi-texturing.
This commit is contained in:
@@ -7,13 +7,15 @@ is
|
||||
|
||||
package body Mixin
|
||||
is
|
||||
use openGL.texture_Set;
|
||||
|
||||
|
||||
overriding
|
||||
procedure texture_Object_is (Self : in out textured_Item; Which : in texture_Set.texture_Id;
|
||||
Now : in openGL.texture.Object)
|
||||
is
|
||||
begin
|
||||
Self.texture_Details.Objects (Integer (Which)) := Now;
|
||||
Self.texture_Set.Details (detail_Count (Which)).Object := Now;
|
||||
end texture_Object_is;
|
||||
|
||||
|
||||
@@ -22,7 +24,7 @@ is
|
||||
function texture_Object (Self : in textured_Item; Which : in texture_Set.texture_Id) return openGL.texture.Object
|
||||
is
|
||||
begin
|
||||
return Self.texture_Details.Objects (Integer (Which));
|
||||
return Self.texture_Set.Details (detail_Count (Which)).Object;
|
||||
end texture_Object;
|
||||
|
||||
|
||||
@@ -33,7 +35,7 @@ is
|
||||
Now : in texture_Set.fade_Level)
|
||||
is
|
||||
begin
|
||||
Self.texture_Details.Fades (Which) := Now;
|
||||
Self.texture_Set.Details (detail_Count (Which)).Fade := Now;
|
||||
end Fade_is;
|
||||
|
||||
|
||||
@@ -42,7 +44,7 @@ is
|
||||
function Fade (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.fade_Level
|
||||
is
|
||||
begin
|
||||
return Self.texture_Details.Fades (Which);
|
||||
return Self.texture_Set.Details (detail_Count (Which)).Fade;
|
||||
end Fade;
|
||||
|
||||
|
||||
@@ -52,7 +54,7 @@ is
|
||||
Now : in texture_Set.Tiling)
|
||||
is
|
||||
begin
|
||||
Self.texture_Details.texture_Tilings (Which) := Now;
|
||||
Self.texture_Set.Details (detail_Count (Which)).texture_Tiling := Now;
|
||||
end Tiling_is;
|
||||
|
||||
|
||||
@@ -61,7 +63,7 @@ is
|
||||
function Tiling (Self : in textured_Item; Which : in texture_Set.texture_Id) return texture_Set.Tiling
|
||||
is
|
||||
begin
|
||||
return Self.texture_Details.texture_Tilings (Which);
|
||||
return Self.texture_Set.Details (detail_Count (Which)).texture_Tiling;
|
||||
end Tiling;
|
||||
|
||||
|
||||
@@ -71,7 +73,7 @@ is
|
||||
Now : in openGL.asset_Name)
|
||||
is
|
||||
begin
|
||||
Self.texture_Details.Textures (Positive (Which)) := Now;
|
||||
Self.texture_Set.Details (detail_Count (Which)).Texture := Now;
|
||||
end Texture_is;
|
||||
|
||||
|
||||
@@ -81,7 +83,7 @@ is
|
||||
function texture_Count (Self : in textured_Item) return Natural
|
||||
is
|
||||
begin
|
||||
return Self.texture_Details.texture_Count;
|
||||
return Natural (Self.texture_Set.Count);
|
||||
end texture_Count;
|
||||
|
||||
|
||||
@@ -90,7 +92,7 @@ is
|
||||
function texture_Applied (Self : in textured_Item; Which : in texture_Set.texture_Id) return Boolean
|
||||
is
|
||||
begin
|
||||
return Self.texture_Details.texture_Applies (Which);
|
||||
return Self.texture_Set.Details (detail_Count (Which)).texture_Apply;
|
||||
end texture_Applied;
|
||||
|
||||
|
||||
@@ -100,7 +102,7 @@ is
|
||||
Now : in Boolean)
|
||||
is
|
||||
begin
|
||||
Self.texture_Details.texture_Applies (Which) := Now;
|
||||
Self.texture_Set.Details (detail_Count (Which)).texture_Apply := Now;
|
||||
end texture_Applied_is;
|
||||
|
||||
|
||||
@@ -109,30 +111,32 @@ is
|
||||
overriding
|
||||
procedure animate (Self : in out textured_Item)
|
||||
is
|
||||
use type texture_Set.Animation_view;
|
||||
-- use type texture_Set.Animation_view;
|
||||
begin
|
||||
if Self.texture_Details.Animation = null
|
||||
then
|
||||
return;
|
||||
end if;
|
||||
|
||||
texture_Set.animate (Self.texture_Details.Animation.all,
|
||||
Self.texture_Details.texture_Applies);
|
||||
-- texture_Set.animate (Self.texture_Set.Animation.all,
|
||||
-- Self.texture_Set.texture_Applies);
|
||||
|
||||
texture_Set.animate (Self.texture_Set);
|
||||
end animate;
|
||||
|
||||
|
||||
|
||||
function texture_Details (Self : in textured_Item) return openGL.texture_Set.Details
|
||||
function texture_Details (Self : in textured_Item) return openGL.texture_Set.item
|
||||
is
|
||||
begin
|
||||
return Self.texture_Details;
|
||||
return Self.texture_Set;
|
||||
end texture_Details;
|
||||
|
||||
|
||||
procedure texture_Details_is (Self : in out textured_Item; Now : in openGL.texture_Set.Details)
|
||||
procedure texture_Details_is (Self : in out textured_Item; Now : in openGL.texture_Set.item)
|
||||
is
|
||||
begin
|
||||
Self.texture_Details := Now;
|
||||
Self.texture_Set := Now;
|
||||
end texture_Details_is;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user