X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FImageIO.h;h=b3d0a498c66ae4165508b27cb8362508c6527ffe;hb=599983e84cffd250055557d78b4d8b4af84cb092;hp=f59a0a84e593effb2b8fcd24ed0fafcdb8e3ea38;hpb=97989f58ab13c64fbe05e629d2b2a024a2c3cfa4;p=lugaru.git diff --git a/Source/ImageIO.h b/Source/ImageIO.h index f59a0a8..b3d0a49 100644 --- a/Source/ImageIO.h +++ b/Source/ImageIO.h @@ -1,5 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games +Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -40,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);