| 346 | } |
| 347 | |
| 348 | void SlangProgram::bindMesh(MeshPtr mesh, rhi::RenderState& renderState) |
| 349 | { |
| 350 | if (!_rootObject) |
| 351 | { |
| 352 | throw ExceptionRenderError("Cannot bind geometry without a valid program"); |
| 353 | } |
| 354 | if (!mesh) |
| 355 | { |
| 356 | throw ExceptionRenderError("No mesh to bind"); |
| 357 | } |
| 358 | |
| 359 | if (mesh != _boundMesh) |
| 360 | { |
| 361 | unbindGeometry(); |
| 362 | bindUniformGeomprops(mesh); |
| 363 | } |
| 364 | |
| 365 | _boundMesh = mesh; |
| 366 | |
| 367 | bindVertexInputs(mesh, renderState); |
| 368 | } |
| 369 | |
| 370 | rhi::ComPtr<rhi::IBuffer> SlangProgram::getIndexBuffer(MeshPartitionPtr partition) |
| 371 | { |
no test coverage detected