4 #include <rag/Platform.h>
5 #include <rag/ResourceMgr.h>
26 static Image*
loadImage(
const std::string& path =
"",
int textureWrapMode = GL_CLAMP_TO_EDGE,
bool deleteImageData =
true,
bool downloaded =
false);
31 Image(
const std::string& path =
"",
int textureWrapMode = GL_CLAMP_TO_EDGE,
bool deleteImageData =
true,
bool downloaded =
false);
59 static int s_memorySize;
67 int nextpot(
unsigned int n);
68 void* rgba8888_to_rgba4444(
void* src);
75 static std::vector<std::string> compressedFolders;
virtual ~Image()
Default destructor.
Definition: Image.cpp:71
static void setCompressedFolder(std::string folder)
Adds a compressed folder.
Definition: Image.cpp:342
Image(const std::string &path="", int textureWrapMode=GL_CLAMP_TO_EDGE, bool deleteImageData=true, bool downloaded=false)
Returns a functional image with size, the image is loaded in background.
Definition: Image.cpp:25
virtual void loadInBackground() override
CPU intensive load goes here.
Definition: Image.cpp:84
Interface to load images.
Definition: ImageLoader.h:8
virtual void loadSync() override
The part of the loading that must be done in main thread.
Definition: Image.cpp:90
Loader for .jpg format.
Definition: ImageLoaderJPG.h:14
void reload()
on context lost, images can be reloaded.
Definition: Image.cpp:183
static void clearCompressedFolders()
Clears all compressed folders.
Definition: Image.cpp:351
Abstract class the represent a game Resource, typically something costly to loaded.
Definition: ResourceMgr.h:18
static Image * loadImage(const std::string &path="", int textureWrapMode=GL_CLAMP_TO_EDGE, bool deleteImageData=true, bool downloaded=false)
Returns a functional image with size, the image is loaded in background.
Definition: Image.cpp:14
Image object.
Definition: Image.h:19