SFML-Website
SFML-Website copied to clipboard
3.0 Migration guide does not give guidance for change to sf::RenderStates constructor
In 2.6.x, there is this constructor
RenderStates::RenderStates(const BlendMode& theBlendMode, const Transform& theTransform, const Texture* theTexture, const Shader* theShader);
Commits https://github.com/SFML/SFML/commit/ebf485737fc6c0dc08f576273f2d6186bf9259da and https://github.com/SFML/SFML/commit/eb07e1e6c57f45fe37a1e057bbcc90154141e059 changed this constructor 3.0.0
RenderStates::RenderStates(const BlendMode& theBlendMode,
const StencilMode& theStencilMode,
const Transform& theTransform,
CoordinateType theCoordinateType,
const Texture* theTexture,
const Shader* theShader);
It is not clear how to replicate the same behavior. I see two options
- Use
RenderStates::RenderStates()and then set every not-new member withoperator=, since they are public members of the RenderStates struct - Read
RenderStates.hppand assume the 2.6.x-like defaults for the new arguments to the constructor areStencilMode()andCoordinateType::Pixels
The only line in the migration guide that might help with this is
"Added new sf::CoordinateType enumeration to sf::RenderStates::RenderStates"
https://www.sfml-dev.org/tutorials/3.0/getting-started/migrate/#other-minor-changes
I suggest adding something to the migration guide for this change, especially what StencilMode to use to not change behavior