Omitted "Blend" prefix for nested BlendMode enums

BlendMode::Factor instead of BlendMode::BlendFactor
BlendMode::Equation instead of BlendMode::BlendEquation
This commit is contained in:
Jan Haller 2014-03-12 12:22:47 +01:00
parent 05d196d86d
commit 75784dbb9a
3 changed files with 17 additions and 17 deletions

View File

@ -46,7 +46,7 @@ struct SFML_GRAPHICS_API BlendMode
/// \brief Enumeration of the blending factors /// \brief Enumeration of the blending factors
/// ///
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
enum BlendFactor enum Factor
{ {
Zero, ///< (0,0,0,0) Zero, ///< (0,0,0,0)
One, ///< (1,1,1,1) One, ///< (1,1,1,1)
@ -65,7 +65,7 @@ struct SFML_GRAPHICS_API BlendMode
/// \brief Enumeration of the blending equations /// \brief Enumeration of the blending equations
/// ///
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
enum BlendEquation enum Equation
{ {
Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor
Subtract ///< Pixel = Src * SrcFactor - Dst * DstFactor Subtract ///< Pixel = Src * SrcFactor - Dst * DstFactor
@ -90,19 +90,19 @@ struct SFML_GRAPHICS_API BlendMode
/// \param alphaBlendEquation Specifies how to combine the source and destination alphas. /// \param alphaBlendEquation Specifies how to combine the source and destination alphas.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
BlendMode(BlendFactor colorSourceFactor, BlendFactor colorDestinationFactor, BlendMode(Factor colorSourceFactor, Factor colorDestinationFactor,
BlendEquation colorBlendEquation, BlendFactor alphaSourceFactor, Equation colorBlendEquation, Factor alphaSourceFactor,
BlendFactor alphaDestinationFactor, BlendEquation alphaBlendEquation); Factor alphaDestinationFactor, Equation alphaBlendEquation);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member Data // Member Data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
BlendFactor colorSrcFactor; ///< Source blending factor for the color channels Factor colorSrcFactor; ///< Source blending factor for the color channels
BlendFactor colorDstFactor; ///< Destination blending factor for the color channels Factor colorDstFactor; ///< Destination blending factor for the color channels
BlendEquation colorEquation; ///< Blending equation for the color channels Equation colorEquation; ///< Blending equation for the color channels
BlendFactor alphaSrcFactor; ///< Source blending factor for the alpha channel Factor alphaSrcFactor; ///< Source blending factor for the alpha channel
BlendFactor alphaDstFactor; ///< Destination blending factor for the alpha channel Factor alphaDstFactor; ///< Destination blending factor for the alpha channel
BlendEquation alphaEquation; ///< Blending equation for the alpha channel Equation alphaEquation; ///< Blending equation for the alpha channel
}; };
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -57,9 +57,9 @@ alphaEquation (BlendMode::Add)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
BlendMode::BlendMode(BlendFactor colorSourceFactor, BlendFactor colorDestinationFactor, BlendMode::BlendMode(Factor colorSourceFactor, Factor colorDestinationFactor,
BlendEquation colorBlendEquation, BlendFactor alphaSourceFactor, Equation colorBlendEquation, Factor alphaSourceFactor,
BlendFactor alphaDestinationFactor, BlendEquation alphaBlendEquation) : Factor alphaDestinationFactor, Equation alphaBlendEquation) :
colorSrcFactor(colorSourceFactor), colorSrcFactor(colorSourceFactor),
colorDstFactor(colorDestinationFactor), colorDstFactor(colorDestinationFactor),
colorEquation (colorBlendEquation), colorEquation (colorBlendEquation),

View File

@ -37,8 +37,8 @@
namespace namespace
{ {
// Convert an sf::BlendMode::BlendFactor constant to the corresponding OpenGL constant. // Convert an sf::BlendMode::Factor constant to the corresponding OpenGL constant.
sf::Uint32 factorToGlConstant(sf::BlendMode::BlendFactor blendFactor) sf::Uint32 factorToGlConstant(sf::BlendMode::Factor blendFactor)
{ {
switch (blendFactor) switch (blendFactor)
{ {
@ -58,7 +58,7 @@ namespace
// Convert an sf::BlendMode::BlendEquation constant to the corresponding OpenGL constant. // Convert an sf::BlendMode::BlendEquation constant to the corresponding OpenGL constant.
sf::Uint32 equationToGlConstant(sf::BlendMode::BlendEquation blendEquation) sf::Uint32 equationToGlConstant(sf::BlendMode::Equation blendEquation)
{ {
switch (blendEquation) switch (blendEquation)
{ {