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

patch draw(a::Actor) function #17

Merged
merged 1 commit into from
Oct 17, 2020
Merged

patch draw(a::Actor) function #17

merged 1 commit into from
Oct 17, 2020

Conversation

dustyirwin
Copy link
Contributor

Update draw(a::Actor) method to use SDL2.DestroyTexture on generated textures after they have been rendered. Should address #15

Update draw(a::Actor) method to use `SDL2.DestroyTexture` on generated textures after they have been rendered. Should address #15
@aviks
Copy link
Owner

aviks commented Oct 17, 2020

Thanks for this. For the record, what platform were you primarily testing this on?

@aviks aviks merged commit 53a1ee5 into aviks:master Oct 17, 2020
@dustyirwin
Copy link
Contributor Author

dustyirwin commented Oct 18, 2020

No problem :) I was using Ubuntu 20.04 Linux, but ran into sound card issues related to a missing alsa.conf file, so I switched to Windows 10 and it seems to be working OK.

I found this fix reading through this SDL post: https://stackoverflow.com/questions/30768985/sdl-image-disappears-after-15-seconds and destroying the textures seemed to fix my issue. However, as Benjamin Lindley points out, it would likely be better to pre-load textures that have a lot of demand to avoid having to re-create and destroy them.

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

Successfully merging this pull request may close these issues.

2 participants