bind abstract method

void bind(
  1. RenderPass pass,
  2. TransientWriter transientsBuffer,
  3. Matrix4 modelTransform,
  4. Matrix4 cameraTransform,
  5. Vector3 cameraPosition, {
  6. Shader? shaderOverride,
})

Binds vertex/index buffers and per-frame uniforms onto pass in preparation for a draw call.

Implementations write the model and camera transforms (and any subclass-specific values, like the joints texture for skinned geometry) into the supplied transient buffer and bind the resulting uniform views.

shaderOverride is the vertex shader the pipeline actually runs when it differs from this geometry's default vertexShader (a custom material's generated vertex variant). The per-frame uniforms (FrameInfo, the joints texture) must be bound against that shader's slots, since a variant can place its uniform blocks at different binding points.

Implementation

void bind(
  gpu.RenderPass pass,
  TransientWriter transientsBuffer,
  vm.Matrix4 modelTransform,
  vm.Matrix4 cameraTransform,
  vm.Vector3 cameraPosition, {
  gpu.Shader? shaderOverride,
});