@@ -30,11 +30,11 @@ PbrDrawable::PbrDrawable(scene::SceneNode& node,
3030 materialData_{
3131 shaderManager.get <Mn::Trade::MaterialData>(materialDataKey)},
3232 pbrIbl_ (pbrIbl) {
33- if (materialData_->hasAttribute (" metallicTexture " ) &&
34- materialData_->hasAttribute (" roughnessTexture " )) {
33+ if (materialData_->hasAttribute (" metallicTexturePtr " ) &&
34+ materialData_->hasAttribute (" roughnessTexturePtr " )) {
3535 CORRADE_ASSERT (
36- materialData_->attribute <Mn::GL::Texture2D*>(" metallicTexture " ) ==
37- materialData_->attribute <Mn::GL::Texture2D*>(" roughnessTexture " ),
36+ materialData_->attribute <Mn::GL::Texture2D*>(" metallicTexturePtr " ) ==
37+ materialData_->attribute <Mn::GL::Texture2D*>(" roughnessTexturePtr " ),
3838 " PbrDrawable::PbrDrawable(): if both the metallic and roughness "
3939 " texture exist, they must be packed in the same texture based on glTF "
4040 " 2.0 Spec." , );
@@ -46,16 +46,16 @@ PbrDrawable::PbrDrawable(scene::SceneNode& node,
4646 if (tmpMaterialData.commonTextureMatrix () != Mn::Matrix3{}) {
4747 flags_ |= PbrShader::Flag::TextureTransformation;
4848 }
49- if (materialData_->hasAttribute (" baseColorTexture " )) {
49+ if (materialData_->hasAttribute (" baseColorTexturePtr " )) {
5050 flags_ |= PbrShader::Flag::BaseColorTexture;
5151 }
52- if (materialData_->hasAttribute (" roughnessTexture " )) {
52+ if (materialData_->hasAttribute (" roughnessTexturePtr " )) {
5353 flags_ |= PbrShader::Flag::RoughnessTexture;
5454 }
55- if (materialData_->hasAttribute (" metallicTexture " )) {
55+ if (materialData_->hasAttribute (" metallicTexturePtr " )) {
5656 flags_ |= PbrShader::Flag::MetallicTexture;
5757 }
58- if (materialData_->hasAttribute (" normalTexture " )) {
58+ if (materialData_->hasAttribute (" normalTexturePtr " )) {
5959 flags_ |= PbrShader::Flag::NormalTexture;
6060 if (meshAttributeFlags & gfx::Drawable::Flag::HasTangent) {
6161 flags_ |= PbrShader::Flag::PrecomputedTangent;
@@ -67,7 +67,7 @@ PbrDrawable::PbrDrawable(scene::SceneNode& node,
6767 " must be positive." , );
6868 }
6969 }
70- if (materialData_->hasAttribute (" emissiveTexture " )) {
70+ if (materialData_->hasAttribute (" emissiveTexturePtr " )) {
7171 flags_ |= PbrShader::Flag::EmissiveTexture;
7272 }
7373 if (materialData_->attribute <bool >(" hasPerVertexObjectId" )) {
@@ -165,19 +165,19 @@ void PbrDrawable::draw(const Mn::Matrix4& transformationMatrix,
165165 // just in case user would like to do so during the run-time.
166166
167167 if ((flags_ & PbrShader::Flag::BaseColorTexture) &&
168- (materialData_->attribute <Mn::GL::Texture2D*>(" baseColorTexture " ) !=
168+ (materialData_->attribute <Mn::GL::Texture2D*>(" baseColorTexturePtr " ) !=
169169 nullptr )) {
170170 shader_->bindBaseColorTexture (
171- *materialData_->attribute <Mn::GL::Texture2D*>(" baseColorTexture " ));
171+ *materialData_->attribute <Mn::GL::Texture2D*>(" baseColorTexturePtr " ));
172172 }
173173
174174 if (flags_ &
175175 (PbrShader::Flag::RoughnessTexture | PbrShader::Flag::MetallicTexture)) {
176176 Mn::GL::Texture2D* metallicRoughnessTexture =
177- materialData_->attribute <Mn::GL::Texture2D*>(" roughnessTexture " );
177+ materialData_->attribute <Mn::GL::Texture2D*>(" roughnessTexturePtr " );
178178 if (!metallicRoughnessTexture) {
179179 metallicRoughnessTexture =
180- materialData_->attribute <Mn::GL::Texture2D*>(" metallicTexture " );
180+ materialData_->attribute <Mn::GL::Texture2D*>(" metallicTexturePtr " );
181181 }
182182 CORRADE_ASSERT (metallicRoughnessTexture,
183183 " PbrDrawable::draw(): texture pointer cannot be nullptr if "
@@ -186,17 +186,17 @@ void PbrDrawable::draw(const Mn::Matrix4& transformationMatrix,
186186 }
187187
188188 if ((flags_ & PbrShader::Flag::NormalTexture) &&
189- (materialData_->attribute <Mn::GL::Texture2D*>(" normalTexture " ) !=
189+ (materialData_->attribute <Mn::GL::Texture2D*>(" normalTexturePtr " ) !=
190190 nullptr )) {
191191 shader_->bindNormalTexture (
192- *materialData_->attribute <Mn::GL::Texture2D*>(" normalTexture " ));
192+ *materialData_->attribute <Mn::GL::Texture2D*>(" normalTexturePtr " ));
193193 }
194194
195195 if ((flags_ & PbrShader::Flag::EmissiveTexture) &&
196- (materialData_->attribute <Mn::GL::Texture2D*>(" emissiveTexture " ) !=
196+ (materialData_->attribute <Mn::GL::Texture2D*>(" emissiveTexturePtr " ) !=
197197 nullptr )) {
198198 shader_->bindEmissiveTexture (
199- *materialData_->attribute <Mn::GL::Texture2D*>(" emissiveTexture " ));
199+ *materialData_->attribute <Mn::GL::Texture2D*>(" emissiveTexturePtr " ));
200200 }
201201
202202 if ((flags_ & PbrShader::Flag::TextureTransformation) &&
0 commit comments