Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <memory>
- namespace internal {
- struct TextureDeleter {
- void operator()(SDL_Texture* resource) {
- if(resource != nullptr) {
- SDL_DestroyTexture(resource);
- }
- }
- }
- }
- using Texture = std::unique_ptr<SDL_Texture, internal::TextureDeleter>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement