Skip to content

Fix leaking images #132

Description

@Schmavery

When loaded images go out of scope we should be deleting them from the GPU
https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glDeleteTextures.xml

This didn't use to be much of an issue if you just load images inside of setup, but now we rerun setup whenever we hotreload, which ends up being a lot and causes performance issues.

Ideally we somehow improve our bindings to use custom blocks with a finalize that frees the images on the gpu https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html#sec461

failing that:
Exposing this might help: bsansouci/reasongl#4 and let us write this in Reprocessing by using a Gc.finalize on the returned imageT objects.

@bsansouci

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions