uiHelper.RendererCallback can not be triggered #7144
Replies: 1 comment
-
It shows that uiHelper.isReadyToRender is true when mHasSwapChain is true in source code. Not really sure the relationship between createSwapChain in UiHelper.java and Engin.java. However it seems that mHasSwapChain will be false thus uiHelper.isReadyToRender will also be false then I cannot get back to the onNativeWindowChanged callback then I can not set swapChain by swapChain = engine?.createSwapChain(surface) inside that function. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to use filament in one of fragment in android project followed sample code and tried as these
private val binding get() = _binding!!
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Filament.init();
choreographer = Choreographer.getInstance()
// frameScheduler = FrameCallback()
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
Log.i("oncreateview", "80");
in the setupSurfaceView:
private fun setupSurfaceView() {
surfaceView = binding.glSurfaceView;
uiHelper = UiHelper(UiHelper.ContextErrorPolicy.DONT_CHECK);
but the UiHelper.RendererCallback never executed, I think it is due to uiHelper.isReadyToRender is always false, and thus the swapChain is always null. Is it because of the uiHelper.isReadyToRender is false that UiHelper.RendererCallback never executed.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions