Use stock function instead of reimplementing with RWops

This commit is contained in:
Dmitry Marakasov 2014-12-27 02:22:15 +03:00
parent 0007a489c3
commit 64952aea9a

View File

@ -50,8 +50,7 @@ Texture::Texture(Renderer& renderer, RWops& rwops) {
} }
Texture::Texture(Renderer& renderer, const std::string& path) { Texture::Texture(Renderer& renderer, const std::string& path) {
RWops rwops = RWops::FromFile(path); texture_ = IMG_LoadTexture(renderer.Get(), path.c_str());
texture_ = IMG_LoadTexture_RW(renderer.Get(), rwops.Get(), 0);
} }
#endif #endif