Index

Package: Textures

Description

package GL.Textures is
----------------------------------------------------------------------- GL.Textures - GL Texture model Copyright (c) Rod Kay 2007 AUSTRALIA Permission granted to use this software, without any warranty, for any purpose, provided this copyright note remains attached and unmodified if sources are distributed further. -----------------------------------------------------------------------

Classes

coordinate_Generator (abstract)

type coordinate_Generator   is abstract tagged null record;

Immediate Children:

Primitive operations:

To_Coordinates
To_Coordinates

References:

gl-textures.ads:53:9 (declaration)
gl-textures.ads:54:46 (reference)
gl-textures.ads:56:36 (reference)
gl-textures.ads:57:36 (reference)
gl-textures.ads:59:29 (reference)

xz_Generator

type xz_Generator is new coordinate_Generator with
      record
         Transform_S  : texture_Transform;          -- transforms point X ordinate.
         Transform_T  : texture_Transform;          -- transforms point Z ordinate.
      end record;

Ancestors:

Primitive operations:

To_Coordinates (overriding To_Coordinates)
to_Coordinates (overriding To_Coordinates)

References:

gl-textures.ads:59:9 (declaration)
gl-textures.adb:84:47 (reference)
gl-textures.adb:87:47 (reference)
gl-textures.ads:65:47 (reference)
gl-textures.ads:66:47 (reference)

Types

texture_Name

subtype texture_Name is GL.Uint;

References:

gl-textures.ads:20:12 (declaration)
gl-textures.adb:22:37 (reference)
gl-textures.adb:24:26 (reference)
gl-textures.adb:31:39 (reference)
gl-textures.adb:33:26 (reference)
gl-textures.ads:98:51 (reference)
gl-textures.ads:99:53 (reference)
gl-textures.ads:138:28 (reference)

texture_Transform

type texture_Transform is
     record
       Offset  : Double;
       Scale   : Double;
     end record;

References:

gl-textures.ads:22:9 (declaration)
gl-textures.adb:43:54 (reference)
gl-textures.adb:44:54 (reference)
gl-textures.adb:63:54 (reference)
gl-textures.adb:64:54 (reference)
gl-textures.ads:49:54 (reference)
gl-textures.ads:50:54 (reference)
gl-textures.ads:61:25 (reference)
gl-textures.ads:62:25 (reference)

Coordinate_1D

type Coordinate_1D is
      record
         S  : aliased GL.Double;
      end record;

References:

gl-textures.ads:31:9 (declaration)
gl-textures.ads:36:60 (reference)

Coordinate_1D_array

type Coordinate_1D_array is array (Natural range <>) of Coordinate_1D;

References:

gl-textures.ads:36:9 (declaration)

Coordinate_2D

type Coordinate_2D is
      record
         S, T  : aliased GL.Double;
      end record;

References:

gl-textures.ads:38:9 (declaration)
gl-buffer-texture_coords.ads:8:89 (reference)
gl-textures.ads:43:93 (reference)

Coordinate_2D_array

type   Coordinate_2D_array is array (GL.Geometry.Positive_Vertex_Id range <>) of aliased Coordinate_2D;

p_Coordinate_2D_array

type p_Coordinate_2D_array is access all Coordinate_2D_array;

References:

gl-textures.ads:44:9 (declaration)
gl-textures.adb:45:47 (reference)
gl-textures.adb:47:29 (reference)
gl-textures.adb:84:124 (reference)
gl-textures.ads:46:75 (reference)
gl-textures.ads:51:47 (reference)
gl-textures.ads:56:121 (reference)
gl-textures.ads:65:124 (reference)
tbd : can the index be '1'- based ?

p_coordinate_Generator

type p_coordinate_Generator is access all coordinate_Generator'Class;

References:

gl-textures.ads:54:9 (declaration)
gl-skins.ads:94:46 (reference)

Coordinate_3D

type Coordinate_3D is
      record
         S, T, R  : aliased GL.Double;
      end record;

References:

gl-textures.ads:68:9 (declaration)
gl-textures.ads:73:60 (reference)

Coordinate_3D_array

type Coordinate_3D_array is array (Natural range <>) of Coordinate_3D;

References:

gl-textures.ads:73:9 (declaration)

Coordinate_4D

type Coordinate_4D is
      record
         S, T, R, Q  : aliased GL.Double;
      end record;

References:

gl-textures.ads:75:9 (declaration)
gl-textures.ads:80:60 (reference)

Coordinate_4D_array

type Coordinate_4D_array is array (Natural range <>) of Coordinate_4D;

References:

gl-textures.ads:80:9 (declaration)

Size

type Size is (Unknown, s2, s4, s8, s16, s32, s64, s128, s256, s512, s1024, s2048);

Objects

type Objects is array (Positive range <>) of Object;

References:

gl-textures.ads:90:9 (declaration)
gl-textures.ads:153:22 (reference)

p_Pool

type p_Pool is access all Pool;

References:

gl-textures.ads:112:9 (declaration)
gl-textures.ads:144:29 (reference)

pool_texture_List (private)

type pool_texture_List is
      record
         Textures  : Objects (1 .. 3000);
         Last      : Natural            := 0;
      end record;

References:

gl-textures.ads:151:9 (declaration)
gl-textures.adb:163:85 (reference)
gl-textures.ads:157:43 (reference)

p_pool_texture_List (private)

type p_pool_texture_List is access all pool_texture_List;

References:

gl-textures.ads:157:9 (declaration)
gl-textures.adb:159:30 (reference)
gl-textures.adb:227:41 (reference)
gl-textures.adb:241:48 (reference)
gl-textures.ads:159:61 (reference)

pool_texture_Lists_by_size (private)

type pool_texture_Lists_by_size is array (Size, Size) of p_pool_texture_List;

References:

gl-textures.ads:159:9 (declaration)
gl-textures.ads:163:38 (reference)

Constants & Global variables

unsupported_format_Error

unsupported_format_Error  : exception;

References:

gl-textures.ads:94:4 (declaration)
gl-textures.adb:108:16 (reference)

Subprograms & Entries

free

procedure free is new Ada.Unchecked_Deallocation 
(Coordinate_2D_array, p_Coordinate_2D_array);

References:

gl-textures.ads:46:14 (declaration)

To_Texture_Coordinates_xz

function To_Texture_Coordinates_xz 
(the_Points: GL.Geometry.GL_Vertex_array;
Transform_S: texture_Transform;
-- transforms point X ordinate. Transform_T: texture_Transform) -- transforms point Z ordinate. return p_Coordinate_2D_array;

To_Coordinates (abstract)

function To_Coordinates 
(Self: coordinate_Generator;
the_Vertices: GL.Geometry.GL_Vertex_array) return GL.Textures.p_Coordinate_2D_array is abstract;

References:

gl-textures.ads:56:13 (declaration)

To_Coordinates (abstract)

function To_Coordinates 
(Self: coordinate_Generator;
the_Vertices: GL.Geometry.GL_Vertex_array) return GL.Textures.Coordinate_2D_array is abstract;

References:

gl-textures.ads:57:13 (declaration)
gl-skins.adb:148:48 (dispatching call)

Called by:

Skins.New_Veneer defined at gl-skins.ads:101:25

To_Coordinates

overriding function To_Coordinates 
(Self: xz_Generator;
the_Vertices: GL.Geometry.GL_Vertex_array) return GL.Textures.p_Coordinate_2D_array;

References:

gl-textures.ads:65:24 (declaration)
gl-textures.adb:84:24 (body)

to_Coordinates

overriding function to_Coordinates 
(Self: xz_Generator;
the_Vertices: GL.Geometry.GL_Vertex_array) return GL.Textures.Coordinate_2D_array;

References:

gl-textures.ads:66:24 (declaration)
gl-textures.adb:87:24 (body)

To_Size

function To_Size 
(From: Positive) return Size;

Calls:

Put_Line defined at a-textio.ads:263:14

New_Texture

function New_Texture 
(image_Filename: String) return Object;

References:

gl-textures.ads:92:13 (declaration)
gl-textures.adb:92:13 (body)
gl-textures.adb:113:8 (label)

Calls:

IO.Load defined at gl-io.ads:78:14
Textures.New_Texture_Name defined at gl-textures.adb:22:13
To_Lower defined at a-chahan.ads:66:13

Destroy

procedure Destroy 
(Self: in out Object);

Called by:

Skins.Destroy defined at gl-skins.ads:99:25

Set_Name

procedure Set_Name 
(Self: in out Object;
To: texture_Name);

References:

gl-textures.ads:98:14 (declaration)
gl-textures.adb:124:14 (body)
gl-textures.adb:128:8 (label)

Name

function  Name     
(Self: Object) return texture_Name;

References:

gl-textures.ads:99:14 (declaration)
gl-textures.adb:130:13 (body)

Size_Width

function Size_Width  
(Self: Object) return Size;

References:

gl-textures.ads:103:13 (declaration)
gl-textures.adb:319:13 (body)

Size_Height

function Size_Height 
(Self: Object) return Size;

References:

gl-textures.ads:104:13 (declaration)
gl-textures.adb:321:13 (body)

Is_Transparent

function  Is_Transparent 
(Self: Object) return Boolean;

New_Texture

function New_Texture 
(From: access Pool;
min_Width: Positive;
min_Height: Positive) return Object;

References:

gl-textures.ads:114:13 (declaration)
gl-textures.adb:150:13 (body)
gl-textures.adb:217:8 (label)
returns a texture object, whose width and height are powers of two, sufficient to contain the requested minimums. tbd : add texture properties to construction parameters !

Free

procedure Free 
(Self: in out Pool;
the_Texture: Object);

Called by:

Destroy defined at gl-textures.ads:96:14
free's a texture, for future use.

Vacuum

procedure Vacuum 
(Self: in out Pool);

References:

gl-textures.ads:125:14 (declaration)
gl-textures.adb:234:14 (body)
gl-textures.adb:255:8 (label)
releases any allocated, but unused, texture objects.