I'm playing around with SFML2 currently and when I'm creating a RenderImage a second time while the RenderWindow is displayed, the programm crashes with the message
X Error of failed request: GLXBadPbuffer
Major opcode of failed request: 128 (GLX)
Minor opcode of failed request: 28 (X_GLXDestroyPbuffer)
Serial number of failed request: 45
Current serial number in output stream: 46
Segmentation fault
Minimal code:
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow app;
app.Create(sf::VideoMode(800, 600), "Playground");
sf::RenderImage target;
target.Create(800, 600);
while (app.IsOpened()) {
target.Create(app.GetWidth(), app.GetHeight()); // Second time this point is reached stuff crashes
app.Display(); // Works when I leave out this though
}
return 0;
}
Bug or my mistake?
(SFML2, Ubuntu 10.4 with a GeForce 9500 GT)