I could only reproduce it on my Linux Mint 13 64bit Laptop with onboard Intel graphic (Mobile Intel GM45 Express Chipset).
It's working without problems on my PC with NVidia Graphic-Card (also Linux Mint 13 64bit)
Here's the minimal Code to reproduce:
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
sf::RenderWindow* RENDER_WINDOW = &window;
// Start the game loop
while (window.isOpen())
{
// Process events
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == sf::Event::Closed)
window.close();
if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Space)
{
sf::RenderTexture render_texture;
render_texture.create(800, 600);
render_texture.setActive(true);
render_texture.pushGLStates();
render_texture.resetGLStates();
glClearColor(0.f, 0.f, 0.f, 0.f);
glClearDepth(1.f);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
render_texture.popGLStates();
RENDER_WINDOW->setActive(true);
}
}
// Clear screen
window.clear();
// Update the window
window.display();
}
return EXIT_SUCCESS;
}
Edit: it crashes when executing the
RENDER_WINDOW->setActive(true); line.