MCPcopy Create free account
hub / github.com/axmolengine/axmol / createImage

Function createImage

core/renderer/TextureCube.cpp:124–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124Image* createImage(std::string_view path)
125{
126 // Split up directory and filename
127 // MUTEX:
128 // Needed since addImageAsync calls this method from a different thread
129
130 std::string fullpath = FileUtils::getInstance()->fullPathForFilename(path);
131 if (fullpath.empty())
132 {
133 return nullptr;
134 }
135
136 // all images are handled by UIImage except PVR extension that is handled by our own handler
137 Image* image = new Image();
138 if (image->initWithImageFile(fullpath))
139 return image;
140
141 delete image;
142 return nullptr;
143}
144
145TextureCube::TextureCube()
146{

Callers 2

initMethod · 0.85
createMethod · 0.85

Calls 4

getInstanceFunction · 0.85
fullPathForFilenameMethod · 0.80
initWithImageFileMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected