opengl+gel.world: Performance mods.
This commit is contained in:
@@ -191,7 +191,7 @@ is
|
|||||||
is
|
is
|
||||||
use Model;
|
use Model;
|
||||||
|
|
||||||
free_Models : graphics_Models;
|
free_Models : graphics_Models with Convention => C; -- Convention C is for performance.
|
||||||
Last : Natural;
|
Last : Natural;
|
||||||
begin
|
begin
|
||||||
Self.obsolete_Models.fetch (free_Models, Last);
|
Self.obsolete_Models.fetch (free_Models, Last);
|
||||||
@@ -208,7 +208,7 @@ is
|
|||||||
is
|
is
|
||||||
use Impostor;
|
use Impostor;
|
||||||
|
|
||||||
free_Impostors : Impostor_Set;
|
free_Impostors : Impostor_Set with Convention => C; -- Convention C is for performance.
|
||||||
Last : Natural;
|
Last : Natural;
|
||||||
begin
|
begin
|
||||||
Self.obsolete_Impostors.fetch (free_Impostors, Last);
|
Self.obsolete_Impostors.fetch (free_Impostors, Last);
|
||||||
|
|||||||
@@ -208,10 +208,15 @@ private
|
|||||||
type visual_geometry_Couples_view is access all visual_geometry_Couples;
|
type visual_geometry_Couples_view is access all visual_geometry_Couples;
|
||||||
|
|
||||||
|
|
||||||
-- graphics_Models
|
--- graphics_Models
|
||||||
--
|
--
|
||||||
|
|
||||||
type graphics_Models is array (1 .. max_Visuals) of Model.view;
|
-- Convention C is for performance.
|
||||||
|
--
|
||||||
|
|
||||||
|
type graphics_Models is array (1 .. max_Visuals) of Model.view
|
||||||
|
with Convention => C;
|
||||||
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
type safe_Models
|
type safe_Models
|
||||||
@@ -228,7 +233,11 @@ private
|
|||||||
-- Impostors
|
-- Impostors
|
||||||
--
|
--
|
||||||
|
|
||||||
type Impostor_Set is array (1 .. max_Visuals) of Impostor.view;
|
-- Convention C is for performance.
|
||||||
|
--
|
||||||
|
|
||||||
|
type Impostor_Set is array (1 .. max_Visuals) of Impostor.view
|
||||||
|
with Convention => C;
|
||||||
|
|
||||||
protected
|
protected
|
||||||
type safe_Impostors
|
type safe_Impostors
|
||||||
|
|||||||
@@ -546,8 +546,8 @@ is
|
|||||||
is
|
is
|
||||||
use type remote.World.sequence_Id;
|
use type remote.World.sequence_Id;
|
||||||
|
|
||||||
all_Sprites : constant id_Maps_of_sprite.Map := Self.all_Sprites.Map.fetch_all;
|
all_Sprites : id_Maps_of_sprite.Map renames Self.all_Sprites.Map.fetch_all;
|
||||||
the_Id : gel.sprite_Id;
|
the_Id : gel.sprite_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if seq_Id > Self.seq_Id.Value
|
if seq_Id > Self.seq_Id.Value
|
||||||
@@ -624,9 +624,9 @@ is
|
|||||||
use id_Maps_of_sprite;
|
use id_Maps_of_sprite;
|
||||||
|
|
||||||
-- all_Sprites : constant id_Maps_of_sprite.Map := Self.id_Map_of_sprite;
|
-- all_Sprites : constant id_Maps_of_sprite.Map := Self.id_Map_of_sprite;
|
||||||
all_Sprites : constant id_Maps_of_sprite.Map := Self.all_Sprites.Map.fetch_all;
|
all_Sprites : id_Maps_of_sprite.Map renames Self.all_Sprites.Map.fetch_all;
|
||||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||||
the_Sprite : gel.Sprite.view;
|
the_Sprite : gel.Sprite.view;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
while has_Element (Cursor)
|
while has_Element (Cursor)
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ is
|
|||||||
use id_Maps_of_sprite,
|
use id_Maps_of_sprite,
|
||||||
remote.World;
|
remote.World;
|
||||||
|
|
||||||
all_Sprites : constant id_Maps_of_sprite.Map := Self.all_Sprites.fetch;
|
all_Sprites : id_Maps_of_sprite.Map renames Self.all_Sprites.fetch;
|
||||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||||
|
|
||||||
|
|
||||||
the_Sprite : gel.Sprite.view;
|
the_Sprite : gel.Sprite.view;
|
||||||
|
|||||||
@@ -615,8 +615,8 @@ is
|
|||||||
is
|
is
|
||||||
use id_Maps_of_sprite;
|
use id_Maps_of_sprite;
|
||||||
|
|
||||||
all_Sprites : constant id_Maps_of_sprite.Map := Self.all_Sprites.fetch;
|
all_Sprites : id_Maps_of_sprite.Map renames Self.all_Sprites.fetch;
|
||||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||||
|
|
||||||
the_sprite_Transforms : sprite_transform_Pairs (1 .. Natural (all_Sprites.Length)) := (others => <>);
|
the_sprite_Transforms : sprite_transform_Pairs (1 .. Natural (all_Sprites.Length)) := (others => <>);
|
||||||
Count : Natural := 0;
|
Count : Natural := 0;
|
||||||
@@ -959,9 +959,9 @@ is
|
|||||||
declare
|
declare
|
||||||
use id_Maps_of_sprite;
|
use id_Maps_of_sprite;
|
||||||
|
|
||||||
all_Sprites : constant id_Maps_of_sprite.Map := Item'Class (Self).all_Sprites.fetch;
|
all_Sprites : id_Maps_of_sprite.Map renames Item'Class (Self).all_Sprites.fetch;
|
||||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||||
the_Sprite : Sprite.view;
|
the_Sprite : Sprite.view;
|
||||||
begin
|
begin
|
||||||
while has_Element (Cursor)
|
while has_Element (Cursor)
|
||||||
loop
|
loop
|
||||||
@@ -1036,11 +1036,11 @@ is
|
|||||||
use id_Maps_of_sprite,
|
use id_Maps_of_sprite,
|
||||||
lace.Text;
|
lace.Text;
|
||||||
|
|
||||||
all_Sprites : constant id_Maps_of_sprite.Map := Item'Class (Self).all_Sprites.fetch;
|
all_Sprites : id_Maps_of_sprite.Map renames Item'Class (Self).all_Sprites.fetch;
|
||||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||||
the_Pairs : remote.World.sprite_model_Pairs (1 .. Natural (all_Sprites.Length));
|
the_Pairs : remote.World.sprite_model_Pairs (1 .. Natural (all_Sprites.Length));
|
||||||
the_Sprite : Sprite.view;
|
the_Sprite : Sprite.view;
|
||||||
i : Natural := 0;
|
i : Natural := 0;
|
||||||
begin
|
begin
|
||||||
while has_Element (Cursor)
|
while has_Element (Cursor)
|
||||||
loop
|
loop
|
||||||
|
|||||||
Reference in New Issue
Block a user