Skip to content

Commit

Permalink
Dedicated Server: Don't prepare materials
Browse files Browse the repository at this point in the history
In novideo mode one should not deal with display graphics.
  • Loading branch information
skyjake committed Jan 4, 2012
1 parent ff3bee1 commit e313ae0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doomsday/engine/portable/src/material.c
Expand Up @@ -169,12 +169,16 @@ boolean Material_IsDrawable(const material_t* mat)

boolean Material_HasGlow(material_t* mat)
{
if(novideo) return false;

{
/// \fixme We should not need to prepare to determine this.
const materialvariantspecification_t* spec = Materials_VariantSpecificationForContext(
MC_MAPSURFACE, 0, 0, 0, 0, GL_REPEAT, GL_REPEAT, -1, -1, -1, true, true, false, false);
const materialsnapshot_t* ms = Materials_Prepare(mat, spec, true);

return (ms->glowing > .0001f);
}
}

boolean Material_HasTranslation(const material_t* mat)
Expand Down
2 changes: 2 additions & 0 deletions doomsday/engine/portable/src/materials.c
Expand Up @@ -1722,6 +1722,8 @@ boolean Materials_IsMaterialInAnimGroup(material_t* mat, int groupNum)

boolean Materials_HasDecorations(material_t* mat)
{
if(novideo) return false;

assert(mat);
/// \fixme We should not need to prepare to determine this.
/// Nor should we need to process the group each time. Cache this decision.
Expand Down

0 comments on commit e313ae0

Please sign in to comment.