- implemented shader support for rendering the SW renderer canvas with legacy OpenGL.

This commit is contained in:
Christoph Oelckers 2018-04-08 13:04:44 +02:00
commit 94e8d59dde
7 changed files with 43 additions and 11 deletions

View file

@ -802,7 +802,7 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
{
auto index = cmd.mSpecialColormap - &SpecialColormaps[0];
if (index < 0 || (unsigned)index >= SpecialColormaps.Size()) index = 0; // if it isn't in the table FBitmap cannot use it. Shouldn't happen anyway.
if (!gl.legacyMode)
if (!gl.legacyMode || cmd.mTexture->UseType == ETextureType::SWCanvas)
{
gl_RenderState.SetFixedColormap(CM_FIRSTSPECIALCOLORMAPFORCED + int(index));
}