public void Update(IPluginIO pin, DX11RenderContext context) { for (int i = 0; i < this.FOutGeom.SliceCount; i++) { DX11VertexGeometry geom = (DX11VertexGeometry)this.FInGeom[i][context].ShallowCopy(); if (this.FInEnabled[i]) { DX11InstancedVertexDrawer d = new DX11InstancedVertexDrawer(); d.InstanceCount = this.FInCnt[i]; geom.AssignDrawer(d); } this.FOutGeom[i][context] = geom; } }
public void Update(IPluginIO pin, DX11RenderContext context) { for (int i = 0; i < this.FOutGeom.SliceCount; i++) { IDX11Geometry g = this.FInGeom[i][context]; bool done = false; if (g is DX11IndexedGeometry) { DX11IndexedGeometry geom = (DX11IndexedGeometry)this.FInGeom[i][context].ShallowCopy(); if (this.FInEnabled[i]) { DX11InstancedIndexedDrawer d = new DX11InstancedIndexedDrawer(); d.InstanceCount = this.FInCnt[i]; d.StartInstanceLocation = this.FInSL[0]; geom.AssignDrawer(d); } this.FOutGeom[i][context] = geom; done = true; } if (g is DX11VertexGeometry) { DX11VertexGeometry geom = (DX11VertexGeometry)this.FInGeom[i][context].ShallowCopy(); if (this.FInEnabled[i]) { DX11InstancedVertexDrawer d = new DX11InstancedVertexDrawer(); d.InstanceCount = this.FInCnt[i]; d.StartInstanceLocation = this.FInSL[0]; geom.AssignDrawer(d); } this.FOutGeom[i][context] = geom; done = true; } if (!done) { this.FOutGeom[i][context] = g; } } }