Esempio n. 1
0
    Image *HGEImageLoader::load(const std::string &filename, bool convertToDisplayFormat)
    {
        HTEXTURE texture = mHGE->Texture_Load(filename.c_str());

        if (texture == NULL)
        {
            throw GCN_EXCEPTION(std::string("Unable to load: ") + filename);
        }

        HGEImage *image = new HGEImage(texture, true);

        if (convertToDisplayFormat)
        {
            image->convertToDisplayFormat();
        }

        return image; 
    }
Esempio n. 2
0
    Image *HGEImageLoader::load(hgeResourceManager* manager, char* name, int resgroup, bool convertToDisplayFormat)
    {
        HTEXTURE texture = manager->GetTexture(name, resgroup);

        if (texture == NULL)
        {
            throw FCN_EXCEPTION(std::string("Unable to load: ") + name);
        }

        HGEImage *image = new HGEImage(texture, true);

        if (convertToDisplayFormat)
        {
            image->convertToDisplayFormat();
        }

        return image;
    }