Finally have the boss fight rendering into a render texture correctly. The 'flipped' problem was because I didn't call .display() in render.
This commit is contained in:
parent
82a38e5fa1
commit
740e1052fe
6 changed files with 17 additions and 11 deletions
|
|
@ -50,7 +50,7 @@ namespace scene {
|
|||
}
|
||||
|
||||
void Engine::init() {
|
||||
$ui.position(SCREEN_WIDTH-BOSS_VIEW_WIDTH,0, BOSS_VIEW_WIDTH, SCREEN_HEIGHT);
|
||||
$ui.position(0,0, BOSS_VIEW_WIDTH, BOSS_VIEW_HEIGHT);
|
||||
$ui.set<guecs::Background>($ui.MAIN, {$ui.$parser, guecs::THEME.TRANSPARENT});
|
||||
auto& background = $ui.get<guecs::Background>($ui.MAIN);
|
||||
background.set_sprite($scene.background, true);
|
||||
|
|
@ -72,7 +72,7 @@ namespace scene {
|
|||
return $ui.mouse(x, y, mods);
|
||||
}
|
||||
|
||||
void Engine::render(sf::RenderWindow& window) {
|
||||
void Engine::render(sf::RenderTarget& window) {
|
||||
$ui.render(window);
|
||||
|
||||
for(auto& fixture : $fixtures) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue