| 92 | } |
| 93 | |
| 94 | void MeshAccessor::Stream::Set(Span<Float2> src) |
| 95 | { |
| 96 | const int32 count = GetCount(); |
| 97 | ASSERT(src.Length() >= count); |
| 98 | if (IsLinear(PixelFormat::R32G32_Float)) |
| 99 | { |
| 100 | Platform::MemoryCopy(_data.Get(), src.Get(), _data.Length()); |
| 101 | } |
| 102 | else |
| 103 | { |
| 104 | for (int32 i = 0; i < count; i++) |
| 105 | _sampler.Write(_data.Get() + i * _stride, Float4(src.Get()[i], 0, 0)); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void MeshAccessor::Stream::Set(Span<Float3> src) |
| 110 | { |
no test coverage detected