#include "../include/Gif.hpp" namespace dchat { SfmlGif::SfmlGif(StringView fileContent) : Gif(fileContent) { } bool SfmlGif::createTexture() { Vec2u size = getSize(); if(!texture.create(size.x, size.y)) { fprintf(stderr, "Failed to create texture for gif!\n"); return false; } texture.setSmooth(true); texture.generateMipmap(); return true; } void SfmlGif::updateTexture(void *textureData) { texture.update((const sf::Uint8*)textureData); } }