Skip to content

Conversation

eXpl0it3r
Copy link
Member

Fixes #1132

I thought to open this PR here, so we can discuss if it works or not here and either merge it or reject it. 🙂

@mantognini mentioned

I invite others to test this as well by checking out the bugfix/osx_render_target branch.

@achpile mentioned

this patch didn't fixed my issue.
everything renders normally if there's something drawn on RenderWindow except the sprite with RenderTexture (as in my example code).

@JonnyPtn
Copy link
Contributor

For what it's worth this looks good to me. Using steps from original issue, I get a blank screen on master, and a purple circle on this branch

@mantognini
Copy link
Member

Thanks @JonnyPtn for testing this!

@achpile, could you try it again? I'm wondering if you forgot to clear the old binaries before recompiling SFML and trying the bugfix/osx_render_target branch. This has been a common issue with many testers.

In the meantime, since we have no better fix and it seems to fix at least some issues for some users, I'd say we go ahead and merge this. Or do you have another, better fix in mind, @binary1248?

@ghost
Copy link

ghost commented Jan 17, 2018

@mantognini sorry, i no longer have macbook :(

@eXpl0it3r
Copy link
Member Author

Since the change is so small and potentially fixes the issue, let's just merge it and if similar issues arise, we can always revert it again.

@binary1248
Copy link
Member

@mantognini No idea if there is another fix. During testing I just realized that resetting the states didn't result in any actual change unless you switch contexts back and forth before. This behaviour is totally unexpected and is not documented anywhere. As you noticed yourself, this is a regression since it used to work in older OS X versions. Considering that there is probably not that much software out there that makes such liberal use of multiple contexts like SFML does, I don't expect Apple to go out of their way to fix this any time soon.

@mantognini
Copy link
Member

Alright, so let's merge this!

@eXpl0it3r eXpl0it3r force-pushed the bugfix/osx_render_target branch from c2c5ace to fe39af4 Compare January 24, 2018 23:25
@eXpl0it3r eXpl0it3r merged commit fe39af4 into master Jan 24, 2018
@eXpl0it3r eXpl0it3r deleted the bugfix/osx_render_target branch January 24, 2018 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RenderTexture not working in OSX on 2.4.0
4 participants