#ifndef TEXTURE_CLASS_H #define TEXTURE_CLASS_H #include #include #include // A loaded image and nothing else. Game elements wear one through a SurfaceTexture, // get these from the ResourceManager. class Texture { public: GLuint ID; std::string path; int width = 0; int height = 0; std::vector pixels; // RGBA, row 0 is the bottom of the image Texture(const char* filename); Texture(int newWidth, int newHeight); // blank white Texture(const Texture& source); // an independent copy with its own GL texture // Sends pixels to the GPU after they've been edited void Upload(); void Delete(); private: void CreateGLTexture(); }; #endif