Skip to content

ViewRenderable not being rendered initially #136

Answered by Venthorus
Venthorus asked this question in Q&A
Discussion options

You must be logged in to vote

I found the culprit and I "fixed" it for myself, but I still don't understand why it is happening in the first place.

The problem starts with the fact that the View does not get attached to the window, so in ViewRenderable.prepareForDraw() the code does not pass the following check:

if (!renderViewToExternalTexture.isAttachedToWindow()
    || !renderViewToExternalTexture.isLaidOut()) {
  // Wait for the view to finish attachment.
  return;
}

Only if it passes this check the ExternalTexture will be set. So the question is why the view does not get attached. The problem is in ViewAttachmentManager.onResume():

void onResume() {
  // A ownerView can only be added to the WindowManager after t…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@Venthorus
Comment options

Venthorus Aug 5, 2021
Collaborator Author

@RGregat
Comment options

@ThomasGorisse
Comment options

@Venthorus
Comment options

Venthorus Aug 10, 2021
Collaborator Author

Comment options

Venthorus
Aug 19, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by Venthorus
Comment options

You must be logged in to vote
1 reply
@ThomasGorisse
Comment options

Comment options

Venthorus
Aug 26, 2021
Collaborator Author

You must be logged in to vote
2 replies
@ThomasGorisse
Comment options

@RGregat
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants