- made FTexture::GetPixels and FTexture::GetColumn non-pure-virtual.

With the software renderer not being used for 2D anymore it would be quite annoying if every texture class had to implement these.
If done properly, the SW renderer should actually be forced to dynamic_cast any texture to a FWorldTexture before using this stuff, but that'd be some pointless overhead better saved.
This commit is contained in:
Christoph Oelckers 2018-04-08 21:19:57 +02:00
commit 551691f42a
3 changed files with 20 additions and 19 deletions

View file

@ -1453,6 +1453,22 @@ bool FTexture::GetTranslucency()
return !!bTranslucent;
}
//===========================================================================
//
// empty stubs to be overloaded by child classes.
//
//===========================================================================
const uint8_t *FTexture::GetColumn(FRenderStyle style, unsigned int column, const Span **spans_out)
{
return nullptr;
}
const uint8_t *FTexture::GetPixels(FRenderStyle style)
{
return nullptr;
}
//===========================================================================
//
// Dummy texture for the 0-entry.
@ -1476,17 +1492,6 @@ void FDummyTexture::SetSize (int width, int height)
CalcBitSize ();
}
// These only get called from the texture precacher which discards the result.
const uint8_t *FDummyTexture::GetColumn(FRenderStyle style, unsigned int column, const Span **spans_out)
{
return nullptr;
}
const uint8_t *FDummyTexture::GetPixels(FRenderStyle style)
{
return nullptr;
}
//==========================================================================
//
// Debug stuff