generic type base_Object is new GL.Buffer.Object with private; type Index is mod <>; type Element is private; type Element_Array is array (Index range <>) of aliased Element; package GL.Buffer.general is
package Element_Pointers is new interfaces.C.Pointers (Index, Element, Element_Array, default_Terminator);
type General_Object is new base_Object with private;
type memory_Map is abstract tagged private;
type read_only_Map is new memory_Map with private;
type write_only_Map is new memory_Map with private;
type read_write_Map is new memory_Map with private;
type base_Object is new GL.Buffer.Object with private;
type Index is mod <>;
type Element is private;
Corrupt_Buffer : exception;
function To_Buffer
( | From | : access Element_Array; |
Usage | : VBO_Usage) return General_Object; |
procedure Set
( | Self | : in out General_Object; |
Set_Position | : Positive := 1; | |
-- tbd : make this raise 'constraint_Error' instead of openGL_Error, when bounds are violated. To | : Element_Array); |
function Get
( | Self | : access General_Object) return Element_Array; |
procedure Release
( | Self | : memory_Map); |
function Map
( | Self | : access General_Object) return read_only_Map'Class; |
function Get
( | Self | : read_only_Map; |
Get_Position | : Index) return Element; |
function Get
( | Self | : read_only_Map; |
Get_Position | : Index; | |
Count | : Positive) return Element_Array; |
function Map
( | Self | : access General_Object) return write_only_Map'Class; |
procedure Set
( | Self | : write_only_Map; |
Set_Position | : Index; | |
To | : access Element); |
procedure Set
( | Self | : write_only_Map; |
Set_Position | : Index; | |
To | : Element); |
function Map
( | Self | : access General_Object) return read_write_Map'Class; |
function Get
( | Self | : read_write_Map; |
Get_Position | : Index) return Element; |
function Get
( | Self | : read_write_Map; |
Get_Position | : Index; | |
Count | : Positive) return Element_Array; |
procedure Set
( | Self | : read_write_Map; |
Set_Position | : Index; | |
To | : access Element); |
procedure Set
( | Self | : read_write_Map; |
Set_Position | : Index; | |
To | : Element); |