Kinect 4 Windows v2.0 Plugin

[=plangton;369107]
Thanks for the explanation.
The issue I face is that I get the depth picture from your plug-in and then I start a thread for processing the depth data.
mainly in the thread I lock the texture with read and fill an array. but your then the process was crashing with error referring to the lines I posted for you.
I think your mutex somehow does not apply to my thread and error happens in the write data to the texture memory.
I solved the issue by some lock and null check, but then I found out that it is speed dependent, meaning that when I decrease the frame rate and make the app slow then the same issue happens
[/]

You gave me some material to think about and I just tested a new method of retrieving camera frames, and from what I see here it boosted the performance by about 20 FPS.
I did so by completely throwing away the update events and therefore the scope locks
Now you retrieve the camera data by getting a pointer to a texture that is being updated directly from the sensor thread by enqueuing the texture update in the rendering thread.
The next step would be to broadcast an event from the rendering after which you would be able to access the data safely (this is similar to the OnHud event).

You can find it here (the body index frame is still using the old model, will update it later today).