I'm working on a 2D game using SFML and many textures (which I'm loading from PNG files, created with Gimp) I use are appearing blurry. They're being drawn without any kind of scaling and transformation, and I have confirmed that smoothing is not enabled for the textures, so I'm not sure what would be causing this or how to fix it.
The image I'm trying to draw is on the left, and what I'm seeing instead is on the right (both are heavily zoomed in).
How can I make SFML draw exactly the contents of the images and not apply this effect?
Edit: Here's a minimal example of what I'm doing:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main(){
sf::RenderWindow window(sf::VideoMode(128,128), "Minimal example");
sf::Texture* tex = new sf::Texture;
tex->loadFromFile("img/bg/0.png");
sf::Sprite s;
s.setTexture(*tex);
window.draw(s);
window.display();
while(window.isOpen()){
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed) {
window.close();
}
}
}
}