| 88 | } |
| 89 | |
| 90 | TextureGpu* getTexture(const char* path) |
| 91 | { |
| 92 | TextureMap::iterator iTexture = s_textures.find(path); |
| 93 | if (iTexture != s_textures.end()) |
| 94 | { |
| 95 | return iTexture->second; |
| 96 | } |
| 97 | |
| 98 | const SDL_Surface* image = TFE_Image::get(path); |
| 99 | if (!image) { return nullptr; } |
| 100 | |
| 101 | TextureGpu* texture = TFE_RenderBackend::createTexture(image->w, image->h, (u32*)image->pixels); |
| 102 | if (texture) { s_textures[path] = texture; } |
| 103 | return texture; |
| 104 | } |
| 105 | |
| 106 | ImGui::MarkdownImageData imageCallback(ImGui::MarkdownLinkCallbackData data) |
| 107 | { |
no test coverage detected