8000 Handling destroy() for managed objects · Issue #3 · mattdesl/kami · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Handling destroy() for managed objects #3
Open
@mattdesl

Description

@mattdesl

Right now WebGLContext has a 'destroy' method, which iterates through its managed objects (like Shaders, Textures, etc) and calls destroy() on them (if the object has such a function).

As more high level tools start to be built on top of Kami, like SpriteBatch and MeshRenderer (immediate mode rendering), they too might have a destroy() method. Now the question is: should we leave this up to the user? Or should we try to make it a convenience that anything with WebGLContext passed as parameter gets managed, and can receive create() and destroy() methods? The latter seems like it might lead to some problems.

will have to think about this... The easy solution is to take the method out of WebGLContext and leave it up to the user entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0