#134 new
lindsay.kay (at xeolabs)

Explicit subgraph destruction

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

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.

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.

Shared Ticket Bins

People watching this ticket

Pages