World renderScene and draw stop UI thread

Started by drdla, May 25, 2017, 11:24:05 AM

Previous topic - Next topic

drdla

Hi,
in first call of onDrawFrame calling of
mWorld.renderScene(mFrameBuffer);
mWorld.draw(mFrameBuffer);

takes long for lowend device, for example 8 seconds for renderScene and 4 seconds for draw. Next call of this method is quick.
If I exit fragment with model if one of this methods is runnig, device stop UI thread intil methods end.
Loading is not on UI thread, and current fragment work prorerly when model loading is in progress, but if I exit this fragment, IU thread wait for end of load methods.
Calling wordl.dispose() not help.
Stop of loading thread is not possible befere loading is complete.

Any advice for solve this?
Thank you for answer

drdla

I found out that this is because TextureView after setRenderer wait for render object. But I don't know how to stop it, because no methods like onPause are call until object is render.

EgonOlsen

... Not sure what you mean... What is TextureView?