Created
February 5, 2012 11:09
-
-
Save flyx/1744787 to your computer and use it in GitHub Desktop.
Example interfacing with C and arrays in Ada
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with Interfaces.C; | |
package Whatev is | |
package C renames Interfaces.C; | |
type Vector_Index is (X, Y, Z, W); | |
type Vector is array (Vector_Index range <>) of aliased C.double; | |
pragma Convention (C, Vector); | |
procedure Vertex (Value : Vector); | |
pragma Import (Convention => StdCall, Entity => Vertex, | |
External_Name => "glVertex4dv"); | |
end Whatev; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment