コード例 #1
0
        protected void SubmitFrame()
        {
            if (!_framePrepared)
            {
                throw new Exception("PrepareFrameCapture must be called before rendering when submitting a frame.");
            }
            _frameSubmitted = true;

            // release the rendertarget so GetData does not fail
            gd.SetRenderTarget(null);

            var capturedFrame = _captureRenderTarget.ToPixelData();

            _submittedFrames.Add(capturedFrame);

            gd.SetRenderTarget(_captureRenderTarget);
        }