Mercurial > games > semicongine
changeset 1351:7b8a6b5e9a46
add: more generic way to index gpu array
author | sam <sam@basx.dev> |
---|---|
date | Wed, 11 Sep 2024 23:26:08 +0700 |
parents | 6646270a6032 |
children | 3bd16ad0e1b9 93a6d70d845f |
files | semicongine/rendering.nim |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/rendering.nim Sat Sep 07 22:56:10 2024 +0700 +++ b/semicongine/rendering.nim Wed Sep 11 23:26:08 2024 +0700 @@ -178,10 +178,10 @@ proc `=copy`[T](dest: var Pipeline[T], source: Pipeline[T]) {.error.} proc `=copy`[T](dest: var DescriptorSetData[T], source: DescriptorSetData[T]) {.error.} -proc `[]`*[T, S](a: GPUArray[T, S], i: int): T = +proc `[]`*[T, S](a: GPUArray[T, S], i: SomeInteger): T = a.data[i] -proc `[]=`*[T, S](a: var GPUArray[T, S], i: int, value: T) = +proc `[]=`*[T, S](a: var GPUArray[T, S], i: SomeInteger, value: T) = a.data[i] = value template forDescriptorFields(