mirror of
https://github.com/Relintai/sfw.git
synced 2025-01-17 14:47:18 +01:00
26 lines
473 B
C
26 lines
473 B
C
|
#ifndef TEXTURE_H
|
||
|
#define TEXTURE_H
|
||
|
|
||
|
#include "opengl.h"
|
||
|
#include <SDL.h>
|
||
|
|
||
|
class Texture {
|
||
|
public:
|
||
|
enum TextureFilter {
|
||
|
TEXTURE_FILTER_NEAREST = 0,
|
||
|
TEXTURE_FILTER_LINEAR,
|
||
|
};
|
||
|
|
||
|
void load_image(const char * file_name, const int format = GL_RGBA, const int internal_components = GL_RGBA);
|
||
|
void apply_filter();
|
||
|
|
||
|
TextureFilter filter;
|
||
|
GLuint texture;
|
||
|
SDL_Surface *image;
|
||
|
|
||
|
Texture();
|
||
|
virtual ~Texture();
|
||
|
};
|
||
|
|
||
|
#endif // TEXTURE_H
|