varjo icon indicating copy to clipboard operation
varjo copied to clipboard

How to let bind an array?

Open kanubacode opened this issue 5 years ago • 1 comments

I'm trying to let bind an array of vec4's, and I can't for the life of me figure this out :)

I'm trying to generate something like this:

vec4 verts[4] = vec4[4](vec4(...), vec4(...), vec4(...), vec4(...));

I've tried:

(let (((verts (:vec4 4))) (setf (aref verts 0) ...) ...)

as well as various incantations of make-array. Nothing I try is working and I'm seeking any help I can get here. Thanks!

kanubacode avatar Jan 10 '20 05:01 kanubacode

I use (vector) as in https://github.com/cbaggers/varjo/blob/9e77f30220053155d2ef8870ceba157f75e538d4/tests/array-tests.lisp#L74

azimut avatar Aug 15 '21 13:08 azimut