Since the new renderer does all the actual rendering asynchronously is there any way to create a RenderTexture, render something in there and use glReadPixel to check a pixel’s value without resorting to lambdas and async behavior?
I am asking this because I would like to implement a pixel perfect touch detection that ignores touches on invisible pixels for a given sprite and so I need to return immediately whether or not the touch was acknowledged from the onTouchBegan method.
Yes, you could call Renderer::render() function manually, which will execute the current render que, and the only thing in the render que at that moment should only be the stuff you manually called visit inside the rendertexture begin / end
you have to call Renderer::render() before you read pixel, because the visits and draw inside begin and end are just adding commands to the renderqueue
Please, I really need help with it. I want to verify the touch with pixel perfect detection, but I can’t understand the code and how it works. Can someone help me with it? I have no idea how to do it.