Author Topic: World renderScene and draw stop UI thread  (Read 157 times)

Offline drdla

  • byte
  • *
  • Posts: 16
    • View Profile
World renderScene and draw stop UI thread
« on: May 25, 2017, 11:24:05 am »
Hi,
in first call of onDrawFrame calling of
Code: [Select]
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

Offline drdla

  • byte
  • *
  • Posts: 16
    • View Profile
Re: World renderScene and draw stop UI thread
« Reply #1 on: May 26, 2017, 09:08:08 am »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11769
    • View Profile
    • http://www.jpct.net
Re: World renderScene and draw stop UI thread
« Reply #2 on: May 26, 2017, 11:05:50 am »
... Not sure what you mean... What is TextureView?