Skip to content

layerMask in android #6957

Answered by romainguy
mscoder1987 asked this question in Q&A
Jul 15, 2023 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

RenderableManager::Builder::layerMask only affects the renderable being currently created.

Are you calling setLayerMask() with an entity instead of an instance maybe? The proper way to call those APIs (like other RenderableManager APIs) is:

renderableManager.setLayerMask(renderableManager.getInstance(myRenderableEntity), 0xff, 0x00)

view.setVisibleLayers(0xff, 0xff) makes all the layers visible, which you don't need to do in your example since you are removing renderable from layer 0 (the default visible layer).

Here's an example from our own sample code:

// Both these renderables are in layer 1; these calls clear layer 0 and set layer 1
rcm.setLayerMask(rcm.getInstance(lightmapCube->getS…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@romainguy
Comment options

@mscoder1987
Comment options

@romainguy
Comment options

@mscoder1987
Comment options

@romainguy
Comment options

Answer selected by mscoder1987
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