42 if(m_liveReloadEvent) {
43 m_liveReloadEvent->
cancel();
44 m_liveReloadEvent =
nullptr;
47 m_animatedTextures.clear();
48 m_emptyTexture =
nullptr;
56 if(now - lastUpdate < 16)
61 animatedTexture->updateAnimation();
66 m_animatedTextures.clear();
75 for(
auto& it : m_textures) {
84 tex->uploadPixels(image, tex->hasMipmaps());
98 auto it = m_textures.find(filePath);
99 if(it != m_textures.end()) {
100 texture = it->second;
109 std::stringstream fin;
111 texture = loadTexture(fin);
120 m_textures[filePath] = texture;
127 TexturePtr TextureManager::loadTexture(std::stringstream& file)
135 std::vector<ImagePtr> frames;
136 std::vector<int> framesDelay;
141 framesDelay.push_back(frameDelay);
145 m_animatedTextures.push_back(animatedTexture);
146 texture = animatedTexture;