private void InitD3D() { cDev = new ControlDevice(EmptyControl); MakeMipTexture(); MakeIntermediateTexture(); MakeCpuTexture(); ScreenQuad.Init(cDev.device); passThroughFilter = new PassThroughFilter(cDev.device); screenCapture = new ScreenCapture(cDev.device); StartRenderLoop(); }
public void TestPassThroughFilter() { var filter = new PassThroughFilter(); int outputIndex, outputLength; var buffer = new byte[10]; Assert.AreEqual(buffer, filter.Filter(buffer, 1, buffer.Length - 2, out outputIndex, out outputLength)); Assert.AreEqual(1, outputIndex, "outputIndex"); Assert.AreEqual(buffer.Length - 2, outputLength, "outputLength"); Assert.AreEqual(buffer, filter.Flush(buffer, 1, buffer.Length - 2, out outputIndex, out outputLength)); Assert.AreEqual(1, outputIndex, "outputIndex"); Assert.AreEqual(buffer.Length - 2, outputLength, "outputLength"); filter.Reset(); }