Quote Originally Posted by yan_ View Post
yes it's because you remove concurrent access (i'm pretty sure shake come from concurrent access. I've ever had same problem with industrial camera) like only ui thread acces GetPreviewBufferArgb and call CreateTexture.

I don't know what is better. Maybe something between your solution and mine. With your solution if something lock the ui thread for 1 second you will stack 25 call in its eventloop. But you need only one when ui will be unlocked.
I had solved this issue by implemented a thread with manuresetevent:
Code:
while (true)
            {
                ManualResetEvent resetEvent = new ManualResetEvent(true);
                resetEvent.WaitOne();
                int[] _buffer = _viewModel.GetPreviewBuffer();
                resetEvent.Reset(); 
                Deployment.Current.Dispatcher.BeginInvoke(delegate
                {
                    _d3dInterop.CreateTexture(out _buffer[0], (int)_viewModel.PreviewResolution.Width, (int)_viewModel.PreviewResolution.Height/*, 90.0f, 1.0f*/);
                    resetEvent.Set();
                });
            }
but there issue if square was still not solved yet. the buffer data looked like was stretched to fill the hole screen, and it still didn't work atfer I changed the viewport size to the screen resolution