Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leaking images #132

Open
Schmavery opened this issue Apr 28, 2019 · 0 comments
Open

Fix leaking images #132

Schmavery opened this issue Apr 28, 2019 · 0 comments

Comments

@Schmavery
Copy link
Owner

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

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

No branches or pull requests

1 participant