/*
Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
#include "Game.h"
#include "ImageIO.h"
-extern ImageRec texture;
extern bool visibleloading;
/* These two are needed for screenshot */
static bool load_jpg(const char * fname, ImageRec & tex);
static bool save_screenshot_png(const char * fname);
-bool upload_image(const char* fileName)
+ImageRec::ImageRec()
{
- return load_image(fileName, texture);
+ data = ( GLubyte* )malloc( 1024 * 1024 * 4 );
+}
+
+ImageRec::~ImageRec()
+{
+ free(data);
+ data = NULL;
}
bool load_image(const char *file_name, ImageRec &tex)