| 6 | |
| 7 | |
| 8 | void RendererWGPU::initGridLineBuffer() { |
| 9 | const float lines[] = { |
| 10 | 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, |
| 11 | 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, |
| 12 | }; |
| 13 | WGPUContext& ctx = WGPUContext::instance(); |
| 14 | gridLayer_.gridLineVb = ctx.createBuffer(sizeof(lines), wgpu::BufferUsage::Vertex | wgpu::BufferUsage::CopyDst, "Grid_Cell_Unit_Lines"); |
| 15 | ctx.queue()->writeBuffer(*gridLayer_.gridLineVb, 0, lines, sizeof(lines)); |
| 16 | } |
| 17 | |
| 18 | bool RendererWGPU::prepareGridCpuData(const View::RenderRectGridView& grid) { |
| 19 | struct GridBuildContext { |
nothing calls this directly
no test coverage detected