2016-07-14 3 views
0

이유는 모르겠지만 스프라이트가 표시되지 않습니다. 내가 코드를 실행할 때 아무런 오류가 없으며 나는 cout을했고 setTextureRect를 호출하여 sprite를 호출하는 함수가 호출됩니다. 알 수없는 이유로 SFML 스프라이트가 표시되지 않음

함수를 호출 인이 경우이 포인터, 프레임 SF에 대한 단지 형식 정의입니다이 함수 자체가

anim.playFrame(this, sf::IntRect(32, 0, 32, 32)); 

플레이어 객체의 인스턴스를 참조 :: IntRect

게임 루프에서
void Animation::playFrame(IAnimatable* entity, Frame frame) { 
    entity->sprite.setTextureRect(frame); 
    std::cout << "new texture set" << std::endl; 
} 

나는 당신이 흰색 SQUA 있다고 생각

Window.draw(player.sprite); 
Window.display(); 

답변

관련 문제