nuclear@2: #ifndef TEXTURE_H_ nuclear@2: #define TEXTURE_H_ nuclear@2: nuclear@2: #include "image.h" nuclear@2: nuclear@2: class Texture { nuclear@2: private: nuclear@2: Image img; nuclear@2: unsigned int tex; nuclear@2: unsigned int type; nuclear@2: nuclear@2: public: nuclear@2: Texture(); nuclear@2: ~Texture(); nuclear@2: nuclear@2: void create2d(int xsz, int ysz); nuclear@2: void destroy(); nuclear@2: nuclear@2: void set_image(const Image &img); nuclear@2: Image &get_image(); nuclear@2: const Image &get_image() const; nuclear@2: nuclear@2: unsigned int get_texture_id() const; nuclear@2: void bind(int tunit = 0) const; nuclear@2: nuclear@2: bool load(const char *fname); nuclear@2: }; nuclear@2: nuclear@2: #endif // TEXTURE_H_