@@ -157,6 +157,13 @@ class Drawable : public Magnum::SceneGraph::Drawable3D {
157
157
setMaterialValuesInternal (material, true );
158
158
}
159
159
160
+ /* *
161
+ * @brief Whether this drawable has a specified material or was assigned the
162
+ * default fallback material, meaning the material for the object was either
163
+ * not loaded or is otherwise missing.
164
+ */
165
+ bool getUsesFallbackMaterial () const { return usingFallbackMaterial_; }
166
+
160
167
private:
161
168
/* *
162
169
* Set or change this drawable's @ref Magnum::Trade::MaterialData values from passed material.
@@ -171,6 +178,15 @@ class Drawable : public Magnum::SceneGraph::Drawable3D {
171
178
CORRADE_UNUSED bool reset) {}
172
179
173
180
protected:
181
+ /* *
182
+ * @brief Whether this drawable has a specified material or was assigned the
183
+ * default fallback material, meaning the material for the object was either
184
+ * not loaded or is otherwise missing.
185
+ */
186
+ void setUsesFallbackMaterial (bool _usingFallbackMaterial) {
187
+ usingFallbackMaterial_ = _usingFallbackMaterial;
188
+ }
189
+
174
190
/* *
175
191
* @brief resize the jointTransformArray_
176
192
*/
@@ -253,6 +269,13 @@ class Drawable : public Magnum::SceneGraph::Drawable3D {
253
269
254
270
Corrade::Containers::Array<Magnum::Matrix4> jointTransformations_;
255
271
272
+ /* *
273
+ * @brief Whether or not this drawable is being rendered using the default
274
+ * fallback material, which implies either that materials were not loaded, or
275
+ * else no material existed for the source asset to load.
276
+ */
277
+ bool usingFallbackMaterial_ = false ;
278
+
256
279
bool glMeshExists () const { return mesh_ != nullptr ; }
257
280
258
281
private:
0 commit comments