I'm trying to make simple Android application with SFML, but I have problems with rendering textures. When I was loading images, they appeared white. I have made simpler example which also reproduces white sprite at emulator:
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main(int argc, char *argv[])
{
sf::RenderWindow window(sf::VideoMode::getDesktopMode(), "");
sf::Image img;
img.create(200,100,sf::Color::Red);
sf::Texture texture;
if(!texture.loadFromImage(img))
return 0;
sf::Sprite sprite(texture);
sprite.setPosition(200,200);
sprite.setOrigin(50,50);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event)) {}
window.clear(sf::Color::Blue);
window.draw(sprite);// WHY SPRITE IS WHITE?
window.display();
}
return 0;
}
Could you tell me why it's not working correctly? Do I need to add some extra flags while compiling SFML libraries or link extra libraries into final application?