30 lines
565 B
C
30 lines
565 B
C
|
//Texture management class header
|
||
|
|
||
|
#ifndef __TEXTURE_H_INCLUDED__
|
||
|
#define __TEXTURE_H_INCLUDED__
|
||
|
|
||
|
#include<SDL.h>
|
||
|
#include<SDL_image.h>
|
||
|
#include<iostream>
|
||
|
#include<string>
|
||
|
|
||
|
class Texture{
|
||
|
public:
|
||
|
Texture();
|
||
|
~Texture();
|
||
|
void loadTexture(std::string path);
|
||
|
void free();
|
||
|
void render(SDL_Rect* quad,SDL_Rect* frame);
|
||
|
void render(SDL_Rect* quad);
|
||
|
//void render(SDL_Rect* quad);
|
||
|
int getWidth();
|
||
|
int getHeight();
|
||
|
void setRenderer (SDL_Renderer** render);
|
||
|
private:
|
||
|
SDL_Texture* texture = NULL;
|
||
|
int szW, szH;
|
||
|
SDL_Renderer** renderer;
|
||
|
};
|
||
|
|
||
|
#endif
|