1
Window / Window.display()
« on: April 12, 2012, 08:34:14 pm »
What does the window.display() function actually do? Does it call glFlush()? Does it swap buffers? (Does SFML window use doube buffering?)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Renderer::Renderer()
: drawThread(&Renderer::onDraw, this)
{}
Renderer::onDraw()
{
sf::Context glContext; //I have included, excluded, and moved this around but it makes no difference
m_window->setActive(true);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
m_window->display();
}
Renderer::startDraw()
{
m_window->setActive(false);
drawThread.launch();
//glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //This works when uncommented
// m_window->display();
}
int main()
{
while(window->isOpen()){
startDraw();
}
}
MyClass::MyClass(sf::RenderWindow& window)
: m_window(window)
{
this->m_text = sf::Text("Hello World");
}
ld.exe: cannot find -llibsfml-window
but it's not just for window, it's for all of them. i've triple checked that my filenames are correct, and my paths, and i've made everything match the forum post.Hmmm it almost sounds like if the sf::Image is destroyed somehow. But that wouldn't make sense.
One last thing, can you just give a quick try without the renderer at all? Just plain old draw calls.