| 122 | } |
| 123 | |
| 124 | Image* 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 | |
| 145 | TextureCube::TextureCube() |
| 146 | { |
no test coverage detected