Skip to content

Commit

Permalink
Documentation|Material: Minor de::Material apidoc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 18, 2013
1 parent 96b3695 commit ea5a838
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
15 changes: 8 additions & 7 deletions doomsday/engine/include/resource/material.h
Expand Up @@ -392,7 +392,8 @@ class Material : public de::MapElement
bool isSkyMasked() const;

/// Returns @c true if the material has one or more (light) decorations.
bool hasDecorations() const;
/// Equivalent to @code decorationCount() != 0; @endcode
inline bool hasDecorations() const { return decorationCount() != 0; }

/// Returns @c true if one or more of the material's layers are glowing.
bool hasGlow() const;
Expand All @@ -415,20 +416,20 @@ class Material : public de::MapElement
* Choose/create a variant of the material which fulfills @a spec and then
* immediately prepare it for render (e.g., upload textures if necessary).
*
* @note A convenient shorthand of the call tree:
* <pre>
* chooseVariant( @a spec, @c true )->prepare( @a forceSnapshotUpdate )
* </pre>
* Intended as a convenient shorthand of the call tree:
* @code
* chooseVariant(@a spec, true)->prepare(@a forceSnapshotUpdate)
* @endcode
*
* @param spec Specification for the derivation of @a material.
* @param spec Specification with which to derive the variant.
* @param forceSnapshotUpdate @c true= Force an update of the variant's
* state snapshot. The snapshot is automatically updated when first
* prepared for a new render frame. Typically the only time force is
* needed is when the material variant has changed since.
*
* @return Snapshot for the chosen and prepared variant of Material.
*
* @see chooseVariant(), Variant::prepare()
* @see Materials::variantSpecForContext(), chooseVariant(), Variant::prepare()
*/
inline de::MaterialSnapshot const &prepare(de::MaterialVariantSpec const &spec,
bool forceSnapshotUpdate = false)
Expand Down
5 changes: 0 additions & 5 deletions doomsday/engine/src/resource/material.cpp
Expand Up @@ -511,11 +511,6 @@ void Material::clearVariants()
d->clearVariants();
}

bool Material::hasDecorations() const
{
return d->decorations.count() != 0;
}

int Material::getProperty(setargs_t &args) const
{
switch(args.prop)
Expand Down

0 comments on commit ea5a838

Please sign in to comment.