~Sampler()
{}
-
- union
+ bool operator==(const Sampler& rhs) const
{
- unsigned int mBitfield;
-
- struct
- {
- FilterMode mMinificationFilter : 4; ///< The minify filter
- FilterMode mMagnificationFilter : 4; ///< The magnify filter
- WrapMode mSWrapMode : 4; ///< The horizontal wrap mode
- WrapMode mTWrapMode : 4; ///< The vertical wrap mode
- WrapMode mRWrapMode : 4; ///< The vertical wrap mode
- };
-
- };
+ return ( ( mMinificationFilter == rhs.mMinificationFilter ) &&
+ ( mMagnificationFilter == rhs.mMagnificationFilter ) &&
+ ( mSWrapMode == rhs.mSWrapMode ) &&
+ ( mTWrapMode == rhs.mTWrapMode ) &&
+ ( mRWrapMode == rhs.mRWrapMode ) );
+ }
+
+ bool operator!=(const Sampler& rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ FilterMode mMinificationFilter : 4; ///< The minify filter
+ FilterMode mMagnificationFilter : 4; ///< The magnify filter
+ WrapMode mSWrapMode : 4; ///< The horizontal wrap mode
+ WrapMode mTWrapMode : 4; ///< The vertical wrap mode
+ WrapMode mRWrapMode : 4; ///< The vertical wrap mode
};
} // namespace Render
Render::Sampler oldSampler = mSampler;
mSampler = sampler ? *sampler : Sampler();
- if( mSampler.mBitfield != oldSampler.mBitfield )
+ if( mSampler != oldSampler )
{
GLint mode = FilterModeToGL( mSampler.mMinificationFilter, DALI_MINIFY_DEFAULT, GL_MINIFY_DEFAULT );
if( mode != FilterModeToGL( oldSampler.mMinificationFilter, DALI_MINIFY_DEFAULT, GL_MINIFY_DEFAULT ) )