diff --git a/src/Engine/Data/BlinnPhongMaterial.hpp b/src/Engine/Data/BlinnPhongMaterial.hpp index 805eb266b1b..cd069803770 100644 --- a/src/Engine/Data/BlinnPhongMaterial.hpp +++ b/src/Engine/Data/BlinnPhongMaterial.hpp @@ -24,9 +24,7 @@ namespace Data { class ShaderProgram; namespace TextureSemantics { -namespace BlinnPhongMaterial { -enum class TextureSemantic { TEX_DIFFUSE, TEX_SPECULAR, TEX_NORMAL, TEX_SHININESS, TEX_ALPHA }; -} +enum class BlinnPhongMaterial { TEX_DIFFUSE, TEX_SPECULAR, TEX_NORMAL, TEX_SHININESS, TEX_ALPHA }; } // namespace TextureSemantics /** @@ -38,12 +36,12 @@ enum class TextureSemantic { TEX_DIFFUSE, TEX_SPECULAR, TEX_NORMAL, TEX_SHININES class RA_ENGINE_API BlinnPhongMaterial final : public Material, public ParameterSetEditingInterface, - public MaterialTextureSet + public MaterialTextureSet { friend class BlinnPhongMaterialConverter; public: - using TextureSemantic = TextureSemantics::BlinnPhongMaterial::TextureSemantic; + using TextureSemantic = TextureSemantics::BlinnPhongMaterial; public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW @@ -59,7 +57,7 @@ class RA_ENGINE_API BlinnPhongMaterial final * associated textures. */ ~BlinnPhongMaterial() override; - using MaterialTextureSet::addTexture; + using MaterialTextureSet::addTexture; /// \todo Fix this specialiration. Maybe assume that named texture have to be added to manager /// before hand, and that texture on the fly addition is a fix, hence no special care for normal @@ -69,8 +67,7 @@ class RA_ENGINE_API BlinnPhongMaterial final auto texManager = RadiumEngine::getInstance()->getTextureManager(); auto texHandle = texManager->getTextureHandle( texture ); if ( texHandle.isValid() ) { - MaterialTextureSet::addTexture( - semantic, texHandle ); + MaterialTextureSet::addTexture( semantic, texHandle ); } else { TextureParameters data; @@ -79,8 +76,7 @@ class RA_ENGINE_API BlinnPhongMaterial final data.sampler.wrapT = GL_REPEAT; if ( semantic != TextureSemantic::TEX_NORMAL ) data.sampler.minFilter = GL_LINEAR_MIPMAP_LINEAR; - MaterialTextureSet::addTexture( - semantic, data ); + MaterialTextureSet::addTexture( semantic, data ); } } diff --git a/src/Engine/Data/SimpleMaterial.hpp b/src/Engine/Data/SimpleMaterial.hpp index 3e4ad6c1a8f..4d89ce4691e 100644 --- a/src/Engine/Data/SimpleMaterial.hpp +++ b/src/Engine/Data/SimpleMaterial.hpp @@ -18,27 +18,23 @@ namespace Data { /** @brief Namespace to define materials' texture semantics. * - * Convention: add you're material's MyMaterial TextureSemantic Enum inside it's MyMaterial nested - * namespace. + * Convention: add you're material's MyMaterial Enum inside TextureSemantics namespace. */ namespace TextureSemantics { -namespace SimpleMaterial { /// Semantic of the texture : define which BSDF parameter is controled by the texture -enum class TextureSemantic { TEX_COLOR, TEX_MASK }; -} // namespace SimpleMaterial +enum class SimpleMaterial { TEX_COLOR, TEX_MASK }; } // namespace TextureSemantics /** * Base implementation for simple, monocolored, materials. * This material could not be used as is. Only derived class could be used by a renderer. */ -class RA_ENGINE_API SimpleMaterial - : public Material, - public ParameterSetEditingInterface, - public MaterialTextureSet +class RA_ENGINE_API SimpleMaterial : public Material, + public ParameterSetEditingInterface, + public MaterialTextureSet { public: - using TextureSemantic = TextureSemantics::SimpleMaterial::TextureSemantic; + using TextureSemantic = TextureSemantics::SimpleMaterial; /** * Construct a named materialhmb * @param name The name of the material