Bonsoir,
J'utilise la version 2.0
J'ai essayer le screenshoot mais toujours l'écran violet ^^
Je vous envoie mon code :
#include <iostream>
#include <SFML/Graphics.hpp>
#include "Trace.hpp"
#include "Repere.hpp"
using namespace sf;
using namespace std;
int main()
{
RenderWindow window(VideoMode(770,560), "play", Style::Titlebar);
window.setFramerateLimit(10);
bool unique(true);
Trace trace(100);
Repere repere("ressources/repere.bmp");
int i(0);
while(window.isOpen())
{
Event event;
while(window.pollEvent(event))
{
if((event.type == Event::KeyReleased) && (event.key.code == sf::Keyboard::Escape))
{
window.close();
}
if(unique)
{
for(i = 0; i< 100 ; ++i)
{
window.draw(trace.Place(i/10.0));
}
unique = false;
window.display();
}
if((event.type == Event::KeyReleased) && (event.key.code == sf::Keyboard::F1))
{
window.capture().saveToFile("screen.bmp");
}
}
}
return EXIT_SUCCESS;
}
Merci