26 lines
492 B
C
26 lines
492 B
C
|
//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();
|
||
|
bool loadTexture(std::string path,SDL_Renderer** renderer);
|
||
|
void free();
|
||
|
void render(SDL_Rect* quad,SDL_Rect* frame,SDL_Renderer** renderer);
|
||
|
int getWidth();
|
||
|
int getHeight();
|
||
|
private:
|
||
|
SDL_Texture* texture;
|
||
|
int szW, szH;
|
||
|
};
|
||
|
|
||
|
#endif
|