platform-test/texture.h

29 lines
556 B
C
Raw Normal View History

2017-05-01 17:40:03 +00:00
//Texture management class header
#ifndef __TEXTURE_H_INCLUDED__
#define __TEXTURE_H_INCLUDED__
#include<SDL2/SDL.h>
#include<SDL2/SDL_image.h>
#include<iostream>
#include<string>
class PosuTexture{
public:
PosuTexture();
~PosuTexture();
2017-05-06 07:52:25 +00:00
void loadTexture(std::string path);
2017-05-01 17:40:03 +00:00
void free();
2017-05-06 07:52:25 +00:00
void render(SDL_Rect* quad,SDL_Rect* frame);
//void render(SDL_Rect* quad);
2017-05-01 17:40:03 +00:00
int getWidth();
int getHeight();
2017-05-06 07:52:25 +00:00
void setRenderer (SDL_Renderer** render);
2017-05-01 17:40:03 +00:00
private:
2017-05-06 07:52:25 +00:00
SDL_Texture* texture = NULL;
2017-05-01 17:40:03 +00:00
int szW, szH;
2017-05-06 07:52:25 +00:00
SDL_Renderer** renderer;
2017-05-01 17:40:03 +00:00
};
#endif