Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure texture unit 0 is active when reseting RenderTarget states (#…
…523), fix RenderTarget not clearing when a texture used as a RenderTexture color attachment is left bound in a different context (http://en.sfml-dev.org/forums/index.php?topic=9350.0).
- Loading branch information
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not compile on GL ES 1.1 platforms, you need to use an alias for extensions and map it to the correct symbol for GL ES (hope that it's available). This was not a problem before because the implementation of sf::Shader is empty on these platforms ;)
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess what Laurent said. I can only confirm that it fixes the issue on my Windows machine with the AMD driver 14.1.
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case there's no equivalent in GL ES 1.1, you can #ifdef the corresponding code. It will never be executed anyway, because Shader::isAvailable returns false.
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case that I disable the code with an #ifdef, user code that switches texture units in GL ES 1.1 will break SFML as the reporter described. I think the better solution is to add it to GLExtensions. Is there any convention that should be followed? Or can I simply add an entry to the end of both blocks?
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said, this code will never be called in GL ES implementations.
Shader::isAvailable
returnsfalse
. But why are these two calls tied to shaders anyway?Yes, you can just add an entry to the end. Just make it look like the other entries ;)
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to add: it would have to be moved outside of the
Shader::isAvailable()
check as well, since GL ES 1.1 doesn't support shaders but does support multitexturing.24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ad01d1d. This might be a good time to squash the commits ;). I have no idea what would happen if I pushed an amended commit. Maybe these comments would be lost? :P
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they'd stay as they are. Only comments added to removed changes as line comments will be sorted as "previous commits". Check pull request #580 by me. I amended the commit, so four (line) comments got "dropped".
24c364e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The squashed commit can be found at 132f476.