walley892 b51ad9db38
Allow setting vector uniforms by name. (#179927)
Create a few thin wrappers around `UniformFloatSlot` that allow users to
get Vector uniforms by name and set all elements in one go.

Before:
```dart
shader.getUniformFloat('uColor', 0).set(color.r);
shader.getUniformFloat('uColor', 1).set(color.g);
shader.getUniformFloat('uColor', 2).set(color.b);
```

After:
```dart
shader.getUniformVec3('uColor').set(color.r, color.g, color.b);
```

This enforces that the requested vector is actually of the requested
size. For example:
```dart
shader.getUniformVec2('someVec3Uniform');
```
will fail instead of allowing partial uniform access.

## Follow up
This doesn't add list or matrix datatypes, those will come later. 
Also doesn't have anything super fancy like accessors/setters for
individual elements.


## Pre-launch Checklist

- [ x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ x] I read and followed the [Flutter Style Guide], including
[Features we expect every widget to implement].
- [ x] I signed the [CLA].
- [ x] I listed at least one issue that this PR fixes in the description
above.
- [ x] I updated/added relevant documentation (doc comments with `///`).
- [ x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ x] All existing and new tests are passing.
2025-12-30 01:06:42 +00:00
..
2025-10-09 19:44:25 +00:00

Flutter Engine

Setting up the Engine development environment

See here