| 122 | } |
| 123 | |
| 124 | void RendererWGPU::initPotentialFieldQuadBuffer() { |
| 125 | static constexpr float quad[] = { |
| 126 | 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, |
| 127 | 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, |
| 128 | }; |
| 129 | WGPUContext& ctx = WGPUContext::instance(); |
| 130 | fieldLayer_.potentialFieldQuadVb = ctx.createBuffer(sizeof(quad), wgpu::BufferUsage::Vertex | wgpu::BufferUsage::CopyDst, "Potential_Field_Quad"); |
| 131 | ctx.queue()->writeBuffer(*fieldLayer_.potentialFieldQuadVb, 0, quad, sizeof(quad)); |
| 132 | } |
| 133 | |
| 134 | void RendererWGPU::uploadPreparedFieldInstancesGpu() { |
| 135 | const uint64_t instBytes = fieldLayer_.fieldData.size() * sizeof(FieldInstance); |
nothing calls this directly
no test coverage detected