nuclear@1: #ifndef TEXTURE_H_ nuclear@1: #define TEXTURE_H_ nuclear@1: nuclear@1: class Texture { nuclear@1: protected: nuclear@1: unsigned int type; nuclear@1: unsigned int tex; nuclear@1: nuclear@1: int size[3]; nuclear@1: nuclear@1: public: nuclear@1: Texture(); nuclear@1: virtual ~Texture(); nuclear@1: nuclear@1: virtual int get_size(int idx) const; nuclear@1: nuclear@1: friend void bind_texture(const Texture *tex, int texunit); nuclear@1: }; nuclear@1: nuclear@1: void bind_texture(const Texture *tex, int texunit = 0); nuclear@1: nuclear@1: class Texture2D : public Texture { nuclear@1: public: nuclear@1: Texture2D(); nuclear@1: nuclear@1: void create(int xsz, int ysz, float *data = 0); nuclear@1: }; nuclear@1: nuclear@1: class Texture3D : public Texture { nuclear@1: public: nuclear@1: Texture3D(); nuclear@1: nuclear@1: void create(int xsz, int ysz, int zsz, float *data = 0); nuclear@1: }; nuclear@1: nuclear@1: #endif // TEXTURE_H_