diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/glsl.meta.slang | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/glsl.meta.slang b/source/slang/glsl.meta.slang index 4412ae460..9e6c6c3cc 100644 --- a/source/slang/glsl.meta.slang +++ b/source/slang/glsl.meta.slang @@ -321,6 +321,17 @@ ${{{{ } }}}} +/// Array length +__generic<T, let N : int> +public extension Array<T, N> +{ + [ForceInline] + public int length() + { + return this.getCount(); + } +} + // // Section 8.1. Angle and Trigonometry Functions // |
