Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set data to a field? #17

Open
JenLyndle opened this issue Aug 5, 2024 · 1 comment
Open

How to set data to a field? #17

JenLyndle opened this issue Aug 5, 2024 · 1 comment

Comments

@JenLyndle
Copy link

JenLyndle commented Aug 5, 2024

I have a field declared like this:
let scalarField = ti.field(
ti.types.vector(ti.types.vector(ti.f32, 2), 3),
2
);
basically this should hold data like this:
[
[[0,3], [4,5], [6,7]],
[[6,7], [8,9], [10,11]]
]
Am not sure how to populate this field. fromArray works for 1D f32/i32 values, but am not sure how to put this data into the field.

@JenLyndle
Copy link
Author

I find that needing to use compile time constants for matrix and vertices is very limiting. thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant