| 32 | namespace { |
| 33 | |
| 34 | BufferAssembler::BeginParams make_begin(const std::string& name, |
| 35 | const int width, |
| 36 | const int height, |
| 37 | const int stride, |
| 38 | const std::size_t total) { |
| 39 | return BufferAssembler::BeginParams{.variable_name = name, |
| 40 | .display_name = name, |
| 41 | .pixel_layout = "rgba", |
| 42 | .transpose = false, |
| 43 | .width = width, |
| 44 | .height = height, |
| 45 | .channels = 1, |
| 46 | .stride = stride, |
| 47 | .type = 0, |
| 48 | .total_byte_size = total}; |
| 49 | } |
| 50 | |
| 51 | std::vector<std::byte> iota_bytes(const std::size_t n) { |
| 52 | std::vector<std::byte> v(n); |