| 137 | } |
| 138 | |
| 139 | void MeshAccessor::Stream::CopyTo(Span<Float2> dst) const |
| 140 | { |
| 141 | const int32 count = GetCount(); |
| 142 | ASSERT(dst.Length() >= count); |
| 143 | if (IsLinear(PixelFormat::R32G32_Float)) |
| 144 | { |
| 145 | Platform::MemoryCopy(dst.Get(), _data.Get(), _data.Length()); |
| 146 | } |
| 147 | else |
| 148 | { |
| 149 | for (int32 i = 0; i < count; i++) |
| 150 | dst.Get()[i] = Float2(_sampler.Read(_data.Get() + i * _stride)); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | void MeshAccessor::Stream::CopyTo(Span<Float3> dst) const |
| 155 | { |