나는 sfml 2.1로 시작하지만 유동적으로 실행되도록 프로그램을 만드는 방법을 찾을 수 없다.SFML - 유체 화면 업데이트?
나는 프로그램이 작동한다는 것을 의미하지만, 버튼을 누르거나 마우스를 움직이는 것과 같은 일을하지 않는 한, 메인 루프 실행 못해, 여기
내 메인 루프 코드 window.setFramerateLimit(30); // set max fps to 30
while (window.isOpen())
{
// this code ignores the framerate limit and doesnt runs when an event is found
while (window.pollEvent(event))
{
// this code works fine but it wont run unless the user presses a key or moves the mouse
}
}
어떤 아이디어에 대한 예입니다?
(http://sfml-dev.org/documentation/2.1/classsf_1_1Window.php#a338e996585faf82e93069858e3b531b7), 코드 [즉,이 일을 해야하는 방법입니다] 그 while (window.pollEvent (event)) 루프 밖에서 "always"를 실행해야한다. – fvu
[튜토리얼] (http://sfml-dev.org/tutorials/2.1/)을 정말로 읽어야합니다. SFML을 사용하려면 필수적입니다. –
예를 들어, 스프라이트를 왼쪽으로 옮기고 싶다면 어떻게해야합니까? – user2953006