I'm running on Windows 7.
I tried both 32 and 64 bit now, and in a simple C++ program, it works as you described, textures are fine even if loaded before a window or context is created.
sf::Texture *texture = new sf::Texture();
texture->loadFromFile("test.png");
sf::RenderWindow *window =
new sf::RenderWindow(sf::VideoMode(640, 480), "Context test");
sf::Sprite *sprite = new sf::Sprite(*texture);
while(window->isOpen()) {
window->clear();
window->draw(*sprite);
window->display();
sf::Event e;
while(window->pollEvent(e)) {
if(e.type == sf::Event::Closed) {
window->close();
}
}
}
delete sprite;
delete window;
delete texture;
(Just in case you wonder why I use pointers - I wanted to resemble as good as possible what happens when using the Java binding.)
The same program using the Java binding results in a white box being painted. The dimensions of the texture are correct (same as the source image), but the content is plain white. As soon as I create a sf::Context instance before creating (loading) the texture, it works just like in the program above.
So this is definitely a problem with my binding, but it is still awkward. The native code executed should be practically the same that I posted above.
I wouldn't know of any thread shenanigans going on in the background in Java, but even if so, according to you, that should not be a problem.