- Implemented GetCaps() for the software renderer

- fixed: Forgot to describe Brightmap capability in the GL Renderer
This commit is contained in:
Rachael Alexanderson 2017-07-29 11:32:58 -04:00
parent 9a9fe7c133
commit 8bb5687159
3 changed files with 21 additions and 2 deletions

View file

@ -1175,13 +1175,13 @@ uint32_t FGLInterface::GetCaps()
else if (!(FGLRenderBuffers::IsEnabled())) else if (!(FGLRenderBuffers::IsEnabled()))
{ {
// truecolor is always available when renderbuffers are unavailable because palette tonemap is not possible // truecolor is always available when renderbuffers are unavailable because palette tonemap is not possible
FlagSet |= RFF_TRUECOLOR | RFF_MATSHADER; FlagSet |= RFF_TRUECOLOR | RFF_MATSHADER | RFF_BRIGHTMAP;
} }
else else
{ {
if (gl_tonemap != 5) // not running palette tonemap shader if (gl_tonemap != 5) // not running palette tonemap shader
FlagSet |= RFF_TRUECOLOR; FlagSet |= RFF_TRUECOLOR;
FlagSet |= RFF_MATSHADER | RFF_POSTSHADER; FlagSet |= RFF_MATSHADER | RFF_POSTSHADER | RFF_BRIGHTMAP;
} }
return (uint32_t)FlagSet; return (uint32_t)FlagSet;
} }

View file

@ -378,3 +378,20 @@ void FSoftwareRenderer::PreprocessLevel()
void FSoftwareRenderer::CleanLevelData() void FSoftwareRenderer::CleanLevelData()
{ {
} }
uint32_t FSoftwareRenderer::GetCaps()
{
ActorRenderFeatureFlags FlagSet = RFF_UNCLIPPEDTEX;
if (r_polyrenderer)
FlagSet |= RFF_POLYGONAL | RFF_TILTPITCH;
else
FlagSet |= RFF_VOXELS;
if (screen && screen->IsBgra())
FlagSet |= RFF_TRUECOLOR;
else
FlagSet |= RFF_COLORMAP;
return (uint32_t)FlagSet;
}

View file

@ -35,6 +35,8 @@ struct FSoftwareRenderer : public FRenderer
void PreprocessLevel() override; void PreprocessLevel() override;
void CleanLevelData() override; void CleanLevelData() override;
uint32_t GetCaps() override;
private: private:
void PrecacheTexture(FTexture *tex, int cache); void PrecacheTexture(FTexture *tex, int cache);