package GL.IO is
type Supported_format is (BMP, TGA);
type Byte_Array is array (Integer range <>) of aliased GL.Ubyte;
type Byte_Array_Ptr is access all Byte_Array;
type Byte_Grid is array (Integer range <>, Integer range <>) of aliased GL.Ubyte;
type Image is record blending_hint : Boolean; -- has the image blending / transparency /alpha ? tex_Format : GL.TexFormatEnm; tex_pixel_Format : GL.TexPixelFormatEnm; size : Integer; Width, Height : Integer; Data : Byte_Array_Ptr; end record;
type Input_buffer is private;
Unsupported_BMP_format, Not_BMP_format, BMP_Unsupported_Bits_per_Pixel, Unsupported_compression : exception;
TGA_Unsupported_Bits_per_pixel : exception;
TGA_Bad_Data : exception;
procedure Free is new Ada.Unchecked_Deallocation
( | Byte_Array, Byte_Array_Ptr); |
function To_TGA_Image
( | Filename | : String) return Image; |
function To_TGA_Image
( | S | : Ada.Streams.Stream_IO.Stream_Access) return Image; |
procedure Load
( | name | : String; |
-- file name format | : Supported_format; | |
-- expected file format ID | : Integer; | |
-- ID is the texture identifier to bind to blending_hint | : out Boolean); |
procedure Load
( | s | : Ada.Streams.Stream_IO.Stream_Access; |
-- input data stream (e.g. UnZip.Streams) format | : Supported_format; | |
-- expected file format ID | : Integer; | |
-- ID is the texture identifier to bind to blending_hint | : out Boolean); |
procedure Load_BMP
( | Name | : String; |
-- File name Id | : Integer; | |
-- Id is the texture identifier to bind to blending_hint | : out Boolean); |
procedure Load_BMP
( | S | : Ada.Streams.Stream_IO.Stream_Access; |
-- Input data stream Id | : Integer; | |
-- Id is the texture identifier to bind to blending_hint | : out Boolean); |
procedure Load_TGA
( | Name | : String; |
-- File name Id | : Integer; | |
-- Id is the texture identifier to bind to blending_hint | : out Boolean); |
procedure Load_TGA
( | S | : Ada.Streams.Stream_IO.Stream_Access; |
-- Input data stream Id | : Integer; | |
-- Id is the texture identifier to bind to blending_hint | : out Boolean); |
procedure Capture_Frame;
procedure Stop_Capture;
procedure Attach_Stream
( | b | : out Input_buffer; |
stm | : Ada.Streams.Stream_IO.Stream_Access); |
procedure Get_Byte
( | b | : in out Input_buffer; |
Return_Byte | : out Ubyte); |