Closed rogermc2 closed 7 years ago
Frankly, I don't really understand why I require an instantiation of Interfaces.C.Pointers
for Load_To_Buffer
. Its implementation only uses the Element
and Element_Array
types from it, so I could just require those two types as generic parameters.
I wonder if it's too late to change that.
If you need to change the implementation, its not too late from my point of view. Is there something that I need to do?
Well, what I'd like to do is to change
generic
with package Pointers is new Interfaces.C.Pointers (<>);
procedure Load_To_Buffer (Target : Buffer_Target;
Data : Pointers.Element_Array;
Usage : Buffer_Usage);
to:
generic
type Index is (<>);
type Element is private;
type Element_Array is array (Index range <>) of aliased Element;
procedure Load_To_Buffer (Target : Buffer_Target;
Data : Element_Array;
Usage : Buffer_Usage);
This would break all existing code that uses it, including a lot of your examples, which would need to be fixed.
That's OK. I'm happy to fix things for the sake of overall improvement.
I'm replacing this PR by a quaternian implementation PR which incorporates these and other changes.
Add print 3D vector and print OpenGL 1D array procedures. Make Maths.Single_Math_Functions package visible as it is needed for many examples.