X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FImageIO.h;h=b3d0a498c66ae4165508b27cb8362508c6527ffe;hb=599983e84cffd250055557d78b4d8b4af84cb092;hp=7fc2ff96f44f7aa1fe236b8a6494dc67d391b7f1;hpb=5509b55dbc13227bdc7b97f2934fa71dad02cc66;p=lugaru.git diff --git a/Source/ImageIO.h b/Source/ImageIO.h index 7fc2ff9..b3d0a49 100644 --- a/Source/ImageIO.h +++ b/Source/ImageIO.h @@ -41,14 +41,20 @@ along with Lugaru. If not, see . #endif /**> DATA STRUCTURES <**/ -typedef struct ImageRec { +class ImageRec { +public: GLubyte *data; // Image Data (Up To 32 Bits) GLuint bpp; // Image Color Depth In Bits Per Pixel. GLuint sizeX; GLuint sizeY; -} ImageRec; + ImageRec(); + ~ImageRec(); +private: + /* Make sure this class cannot be copied to avoid memory problems */ + ImageRec(ImageRec const &); + ImageRec& operator=(ImageRec const &); +}; -bool upload_image(const char* filePath); bool load_image(const char * fname, ImageRec & tex); bool save_screenshot(const char * fname);