Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Explicit subgraph destruction

#134

Although SceneJS does its best to keep a pool of free WebGL resources available using LRU eviction, it should also be possible to explicitly free them.

A SceneJS.Node could then have a destroy flag so that subsequent traversal within its subgraph will be in RENDER_DESTROY mode. Each node type would have its own destruction function to execute when rendered in this mode.

Removal of a node from its parent would actually be a "soft removal" that would set its destroy flag. If the node was then added to some other parent, the destroy flag would be unset. SceneJS would then only actually detach a destroyed child after rendering it. After that, it could be reattached to another parent.

Destruction operations are only required on nodes that store state on WebGL or the SceneJS framework instance, which include:

  • SceneJS.Geometry
  • SceneJS.Texture
  • SceneJS.Socket

TODO: explore cases, design alorithm.

TODO: explore case in which a node is transferred across two separate scene graphs, where it would then be referencing the wrong VRAM resources.

Reported by lindsay.kay (at xeolabs) · August 4th, 2010 @ 10:04 AM

State: new
Milestone: none

Activity

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.