| 183 | } |
| 184 | |
| 185 | bool ImageLoader::loadImage(const std::filesystem::path& path) |
| 186 | { |
| 187 | if (path.empty()) |
| 188 | return false; |
| 189 | |
| 190 | std::filesystem::path resolvedPath = AssetResolver::getDefaultResolver().resolvePath(path); |
| 191 | if (std::filesystem::exists(resolvedPath)) |
| 192 | { |
| 193 | mImagePath = path; |
| 194 | mpTex = Texture::createFromFile(mpDevice, resolvedPath, mGenerateMips, mLoadSRGB); |
| 195 | return mpTex != nullptr; |
| 196 | } |
| 197 | else |
| 198 | { |
| 199 | return false; |
| 200 | } |
| 201 | } |
nothing calls this directly
no test coverage detected