We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

help me to free some memory

Home Forums Programming help me to free some memory

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #51510
    kdv
    Participant

    i’m trying to dispose of invisible geometry buffers, materials and textures to release memory. in the function changeVis (objNames, bool) I added

            if (!bool) {
                var meshArray = obj.resolveMultiMaterial();
                for (var j = 0; j < meshArray.length; j++) {
                    meshArray[j].geometry.dispose();
                    meshArray[j].material.dispose();
                }
            }

    and this disposes of geometry buffers and materials that are not visible at the current moment. help me to dispose of invisible textures :scratch:

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #51765
    kdv
    Participant

    thanks for help )))

    ...
    v3d.MaterialUtils.disposeTextures(mat);

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #51791

    Sorry for not responding earlier. I’m glad you found a solution.

    Chief 3D Verger | LinkedIn | Twitter

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.