public void Evaluate(int SpreadMax) { if (this.FOutQueryable[0] == null) { this.FOutQueryable[0] = this; } this.rendereddevices.Clear(); this.updateddevices.Clear(); invalidate = this.FInVSize.IsChanged || this.FInElemCount.IsChanged || this.FInLayout.IsChanged || FinOutputDrawMode.IsChanged; if (SpreadMax == 0) { if (this.buffer != null) { this.buffer.Dispose(); this.buffer = null; } return; } if (this.FOutBuffer[0] == null) { this.FOutGeom[0] = new DX11Resource <IDX11Geometry>(); this.FOutBuffer[0] = new DX11Resource <DX11RawBuffer>(); } }
public void Update(DX11RenderContext context) { if (this.FOutBuffer.SliceCount == 0) { return; } if (this.updateddevices.Contains(context)) { return; } if (this.invalidate || this.buffer == null) { this.DisposeBuffers(context); this.buffer = new StreamOutputBufferWithRawSupport(context, this.FInVSize[0], this.FInElemCount[0], this.FinOutputDrawMode[0], false, this.FInLayout.ToArray()); this.FOutGeom[0][context] = this.buffer.VertexGeometry; if (context.ComputeShaderSupport) { this.FOutBuffer[0][context] = this.buffer.RawBuffer; } else { this.FOutBuffer[0][context] = null; } } this.updateddevices.Add(context); }
public void Dispose() { if (this.buffer != null) { this.buffer.Dispose(); this.buffer = null; } }
private void DisposeBuffers(DX11RenderContext context) { if (this.buffer != null) { this.buffer.Dispose(); this.buffer = null; } }