summaryrefslogtreecommitdiff
path: root/src/texture.h
blob: 311db4a0b7e8ce2ace3dfbba64a7f3db1bd80d05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <SDL2/SDL.h>
#include <string>

class Texture{
    public:
        Texture(SDL_Renderer* renderer);
        ~Texture();
        int loadFromFile(std::string path);
        void render(int x, int y, SDL_Rect* clip = nullptr);
    private:
        SDL_Texture* texture_;
        int w_;
        int h_;
        SDL_Renderer* renderer_;
};