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

Free OpenGL textures used by sprites #49

Closed
tung opened this issue Jul 6, 2010 · 2 comments
Closed

Free OpenGL textures used by sprites #49

tung opened this issue Jul 6, 2010 · 2 comments
Labels

Comments

@tung
Copy link
Owner

tung commented Jul 6, 2010

Sprites use OpenGL textures, but never free them, which might cause problems if lots of sprites are loaded and used. Sprites should free their textures when garbage collected.

@tung
Copy link
Owner Author

tung commented Jul 23, 2010

This is best done in the OpenGL library itself, by treating textures as userdata and attaching an appropriate __gc metamethod. The current pre-compiled ones don't do this, so it'll need to be added and then rebuilt.

@tung
Copy link
Owner Author

tung commented Jul 30, 2010

Refactor sprite.lua to use new sdlgl.texture.

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

No branches or pull requests

1 participant