I have the code here which triggers the start of a new frame, after the frame count increments to 3 touchengine stalls and never reports a frame as done. I only ever see the first frame out
Hi @djevo1 - glancing at the rest of your code, it looks like you aren’t adding a texture transfer to return the output texture to the instance after you are done with it. The example project demonstrates releasing a texture at the top of DX11Renderer::updateOutputImage()
here and the README has detailed information on texture transfers too.
That’s strange because in my other touchengine plugin I don’t anything more than this and I don’t see the stall. I only release the mutex.
Ah nope, you’re totally right, I missed it.
So that fixed the waiting issue but now I have another issues which is the keyedmutex that is returned from the texture from touchengine is null on the 3rd iteration.
I’m using the same code as the other integration, the only difference is CopyResource but that shouldn’t have an effect on the texture as it’s not taking ownership.
Do you mean the value returned to semaphore
from TEInstanceGetTextureTransfer()
is null? That would be expected for D3D11, where the keyed mutex is obtained from the texture itself.
Ah yes, in some cases the keyed mutex from the texture was null. But the docs say semaphores work in both 11 and 12. Regardless it is resolved now. We store the mutex until we need to use it later.
Semaphores will work - you can use them when supplying image transfers to the instance. When a D3D11 graphics context is associated with the instance, image transfers from TouchEngine, which is what you are describing here, will be done using keyed mutexes.