Not sure if that was already mentioned in the other thread, but if i comment out this line (and leave everything else as it was)
CreateContext(shared, VideoMode::GetDesktopMode().BitsPerPixel, ContextSettings(0, 0, 0));
in GlxContext::GlxContext in in GlxContent.cpp, the error is not shown and the following minimal example does work fully:
#include <iostream>
#include <SFML/Graphics.hpp>
sf::Image image;
void ThreadFunc(void*)
{
sf::Context context;
sf::Sleep(1.f);
image.LoadFromFile("rock.png");
std::cout << "OK!" << std::endl;
}
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600, 32), "Testsuite");
sf::Thread thread(&ThreadFunc);
thread.Launch();
while (window.IsOpened())
{
sf::Event event;
while (window.GetEvent(event))
{
if ((event.Type == sf::Event::KeyPressed && event.Key.Code == sf::Key::Escape)
|| (event.Type ==sf::Event::Closed))
window.Close();
}
window.Clear();
window.Draw(sf::Shape::Rectangle(0, 0, 100, 100, sf::Color::White));
window.Display();
}
return 0;
}
I am not sure what this line is supposed to do though, so it probably broke something else.
[Edit]
Ok, when i try to draw the image that was loaded (and comment out the drawing of the Shape) only a white rectangle is shown. The image is drawn when loaded from the main function though, so i guess thats what the line is for (threading)?