public void DrawBatch(CommandBuffer cb, ulong passID, SourceBatch batch, Span <ConstBlock> pushConsts, DescriptorSet resourceSet, Span <DescriptorSet> resourceSet1) { var shader = batch.material.Shader; if ((passID & shader.passFlags) == 0) { return; } var pass = shader.GetPass(passID); var pipe = pass.GetGraphicsPipeline(FrameGraphPass.RenderPass, SubpassIndex, batch.geometry); cb.BindPipeline(VkPipelineBindPoint.Graphics, pipe); batch.Draw(cb, pushConsts, resourceSet, resourceSet1, pass); }
public virtual void SetNumGeometries(int num) { Array.Resize(ref batches, num); for (int i = 0; i < num; i++) { if (batches[i] == null) { batches[i] = new SourceBatch { geometryType = GeometryType }; } } Array.Resize(ref geometries_, num); Array.Resize(ref geometryData_, num); ResetLodLevels(); }