- separated the software-renderer-specific parts of colormap processing from the common parts.

- moved testcolor and test fades into SWRenderer files.

These CCMDs work by hacking the default colormap and were never implemented for hardware rendering because they require many checks throughout the code.
This commit is contained in:
Christoph Oelckers 2017-03-15 22:04:23 +01:00
commit 921bc763fb
27 changed files with 695 additions and 572 deletions

View file

@ -591,14 +591,6 @@ void GLSceneDrawer::DrawBlend(sector_t * viewsector)
if (blendv.a == 0)
{
blendv = R_BlendForColormap(blendv);
if (blendv.a == 255)
{
// The calculated average is too dark so brighten it according to the palettes's overall brightness
int maxcol = MAX<int>(MAX<int>(GLRenderer->framebuffer->palette_brightness, blendv.r), MAX<int>(blendv.g, blendv.b));
blendv.r = blendv.r * 255 / maxcol;
blendv.g = blendv.g * 255 / maxcol;
blendv.b = blendv.b * 255 / maxcol;
}
}
if (blendv.a == 255)
@ -983,7 +975,6 @@ void GLSceneDrawer::WriteSavePic (player_t *player, FileWriter *file, int width,
struct FGLInterface : public FRenderer
{
bool UsesColormap() const override;
void Precache(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitlist) override;
void RenderView(player_t *player) override;
void WriteSavePic (player_t *player, FileWriter *file, int width, int height) override;
@ -999,18 +990,6 @@ struct FGLInterface : public FRenderer
void Init() override;
};
//===========================================================================
//
// The GL renderer has no use for colormaps so let's
// not create them and save us some time.
//
//===========================================================================
bool FGLInterface::UsesColormap() const
{
return false;
}
//==========================================================================
//
// DFrameBuffer :: Precache