mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
Merge branch 'wallwork' of https://github.com/coelckers/gzdoom into wallwork
This commit is contained in:
commit
1ae2f06161
14 changed files with 192 additions and 156 deletions
|
@ -555,6 +555,7 @@ bool FDrawInfo::PutWallCompat(GLWall *wall, int passflag)
|
|||
int list = list_indices[masked][foggy];
|
||||
auto newwall = dldrawlists[list].NewWall();
|
||||
*newwall = *wall;
|
||||
if (!masked) newwall->ProcessDecals(this);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -46,51 +46,45 @@ struct DecalVertex
|
|||
float u,v;
|
||||
};
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
||||
struct GLDecal
|
||||
{
|
||||
unsigned int vertindex;
|
||||
FMaterial *gltexture;
|
||||
GLWall *wall;
|
||||
DBaseDecal *decal;
|
||||
DecalVertex dv[4];
|
||||
float zcenter;
|
||||
|
||||
int light;
|
||||
int rel;
|
||||
float a;
|
||||
FColormap colormap;
|
||||
|
||||
};
|
||||
|
||||
void GLWall::ProcessDecal(HWDrawInfo *di, DBaseDecal *decal)
|
||||
{
|
||||
auto seg = wall->seg;
|
||||
line_t * line = seg->linedef;
|
||||
side_t * side = seg->sidedef;
|
||||
int i;
|
||||
float zpos;
|
||||
int light;
|
||||
int rel;
|
||||
float a;
|
||||
bool flipx, flipy;
|
||||
DecalVertex dv[4];
|
||||
FTextureID decalTile;
|
||||
GLDecal gldecal;
|
||||
|
||||
|
||||
if (decal->RenderFlags & RF_INVISIBLE) return;
|
||||
if (wall->type == RENDERWALL_FFBLOCK && wall->gltexture->isMasked()) return; // No decals on 3D floors with transparent textures.
|
||||
if (type == RENDERWALL_FFBLOCK && gltexture->isMasked()) return; // No decals on 3D floors with transparent textures.
|
||||
|
||||
|
||||
//if (decal->sprite != 0xffff)
|
||||
{
|
||||
decalTile = decal->PicNum;
|
||||
flipx = !!(decal->RenderFlags & RF_XFLIP);
|
||||
flipy = !!(decal->RenderFlags & RF_YFLIP);
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
decalTile = SpriteFrames[sprites[decal->sprite].spriteframes + decal->frame].lump[0];
|
||||
flipx = SpriteFrames[sprites[decal->sprite].spriteframes + decal->frame].flip & 1;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
FTexture *texture = TexMan[decalTile];
|
||||
if (texture == NULL) return;
|
||||
|
||||
FMaterial *tex;
|
||||
|
||||
|
||||
tex = FMaterial::ValidateTexture(texture, true);
|
||||
|
||||
|
||||
// the sectors are only used for their texture origin coordinates
|
||||
// so we don't need the fake sectors for deep water etc.
|
||||
|
@ -112,7 +106,7 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
//break;
|
||||
|
||||
case RF_RELUPPER:
|
||||
if (wall->type != RENDERWALL_TOP) return;
|
||||
if (type != RENDERWALL_TOP) return;
|
||||
if (line->flags & ML_DONTPEGTOP)
|
||||
{
|
||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
||||
|
@ -123,7 +117,7 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
}
|
||||
break;
|
||||
case RF_RELLOWER:
|
||||
if (wall->type != RENDERWALL_BOTTOM) return;
|
||||
if (type != RENDERWALL_BOTTOM) return;
|
||||
if (line->flags & ML_DONTPEGBOTTOM)
|
||||
{
|
||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
||||
|
@ -134,7 +128,7 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
}
|
||||
break;
|
||||
case RF_RELMID:
|
||||
if (wall->type == RENDERWALL_TOP || wall->type == RENDERWALL_BOTTOM) return;
|
||||
if (type == RENDERWALL_TOP || type == RENDERWALL_BOTTOM) return;
|
||||
if (line->flags & ML_DONTPEGBOTTOM)
|
||||
{
|
||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::floor);
|
||||
|
@ -145,35 +139,39 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
}
|
||||
}
|
||||
|
||||
memset(&gldecal, 0, sizeof(gldecal));
|
||||
gldecal.gltexture = FMaterial::ValidateTexture(texture, true);
|
||||
gldecal.wall = this;
|
||||
gldecal.decal = decal;
|
||||
|
||||
if (decal->RenderFlags & RF_FULLBRIGHT)
|
||||
{
|
||||
light = 255;
|
||||
rel = 0;
|
||||
gldecal.light = 255;
|
||||
gldecal.rel = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
light = wall->lightlevel;
|
||||
rel = wall->rellight + getExtraLight();
|
||||
gldecal.light = lightlevel;
|
||||
gldecal.rel = rellight + getExtraLight();
|
||||
}
|
||||
|
||||
FColormap p = wall->Colormap;
|
||||
gldecal.colormap = Colormap;
|
||||
|
||||
if (level.flags3 & LEVEL3_NOCOLOREDSPRITELIGHTING)
|
||||
{
|
||||
p.Decolorize();
|
||||
gldecal.colormap.Decolorize();
|
||||
}
|
||||
|
||||
|
||||
|
||||
a = decal->Alpha;
|
||||
gldecal.a = decal->Alpha;
|
||||
|
||||
// now clip the decal to the actual polygon
|
||||
FMaterial *tex = gldecal.gltexture;
|
||||
|
||||
float decalwidth = tex->TextureWidth() * decal->ScaleX;
|
||||
float decalheight = tex->TextureHeight() * decal->ScaleY;
|
||||
float decallefto = tex->GetLeftOffset() * decal->ScaleX;
|
||||
float decaltopo = tex->GetTopOffset() * decal->ScaleY;
|
||||
|
||||
auto &glseg = wall->glseg;
|
||||
float leftedge = glseg.fracleft * side->TexelLength;
|
||||
float linelength = glseg.fracright * side->TexelLength - leftedge;
|
||||
|
||||
|
@ -212,6 +210,7 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
float vx = (glseg.x2 - glseg.x1) / linelength;
|
||||
float vy = (glseg.y2 - glseg.y1) / linelength;
|
||||
|
||||
DecalVertex *dv = gldecal.dv;
|
||||
dv[1].x = dv[0].x = glseg.x1 + vx * left;
|
||||
dv[1].y = dv[0].y = glseg.y1 + vy * left;
|
||||
|
||||
|
@ -229,9 +228,9 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
dv[0].v = dv[3].v = tex->GetVB();
|
||||
|
||||
// now clip to the top plane
|
||||
float vzt = (wall->ztop[1] - wall->ztop[0]) / linelength;
|
||||
float topleft = wall->ztop[0] + vzt * left;
|
||||
float topright = wall->ztop[0] + vzt * right;
|
||||
float vzt = (ztop[1] - ztop[0]) / linelength;
|
||||
float topleft = ztop[0] + vzt * left;
|
||||
float topright = ztop[0] + vzt * right;
|
||||
|
||||
// completely below the wall
|
||||
if (topleft < dv[0].z && topright < dv[3].z)
|
||||
|
@ -248,9 +247,9 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
}
|
||||
|
||||
// now clip to the bottom plane
|
||||
float vzb = (wall->zbottom[1] - wall->zbottom[0]) / linelength;
|
||||
float bottomleft = wall->zbottom[0] + vzb * left;
|
||||
float bottomright = wall->zbottom[0] + vzb * right;
|
||||
float vzb = (zbottom[1] - zbottom[0]) / linelength;
|
||||
float bottomleft = zbottom[0] + vzb * left;
|
||||
float bottomright = zbottom[0] + vzb * right;
|
||||
|
||||
// completely above the wall
|
||||
if (bottomleft > dv[1].z && bottomright > dv[2].z)
|
||||
|
@ -278,13 +277,56 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
for (i = 0; i < 4; i++) dv[i].v = vb - dv[i].v;
|
||||
}
|
||||
|
||||
gldecal.zcenter = zpos - decalheight * 0.5f;
|
||||
|
||||
auto verts = gl_drawinfo->AllocVertices(4);
|
||||
gldecal.vertindex = verts.second;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
verts.first[i].Set(dv[i].x, dv[i].z, dv[i].y, dv[i].u, dv[i].v);
|
||||
}
|
||||
di->AddDecal(&gldecal);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
void GLWall::ProcessDecals(HWDrawInfo *di)
|
||||
{
|
||||
if (seg->sidedef != nullptr)
|
||||
{
|
||||
DBaseDecal *decal = seg->sidedef->AttachedDecals;
|
||||
while (decal)
|
||||
{
|
||||
ProcessDecal(di, decal);
|
||||
decal = decal->WallNext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
void FDrawInfo::DrawDecal(GLWall *__wall, DBaseDecal *__decal)
|
||||
{
|
||||
GLDecal *gldecal;
|
||||
auto wall = gldecal->wall;
|
||||
auto decal = gldecal->decal;
|
||||
auto tex = gldecal->gltexture;
|
||||
auto &seg = wall->seg;
|
||||
|
||||
// calculate dynamic light effect.
|
||||
if (gl_lights && GLRenderer->mLightCount && !mDrawer->FixedColormap && gl_light_sprites)
|
||||
{
|
||||
// Note: This should be replaced with proper shader based lighting.
|
||||
double x, y;
|
||||
decal->GetXY(seg->sidedef, x, y);
|
||||
gl_SetDynSpriteLight(nullptr, x, y, zpos - decalheight * 0.5f, wall->sub);
|
||||
gl_SetDynSpriteLight(nullptr, x, y, gldecal->zcenter, wall->sub);
|
||||
}
|
||||
|
||||
// alpha color only has an effect when using an alpha texture.
|
||||
|
@ -293,9 +335,6 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
gl_RenderState.SetObjectColor(decal->AlphaColor | 0xff000000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
gl_SetRenderStyle(decal->RenderStyle, false, false);
|
||||
gl_RenderState.SetMaterial(tex, CLAMP_XY, decal->Translation, 0, !!(decal->RenderStyle.Flags & STYLEF_RedIsAlpha));
|
||||
|
||||
|
@ -305,7 +344,7 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
else gl_RenderState.AlphaFunc(GL_GREATER, 0.f);
|
||||
|
||||
|
||||
mDrawer->SetColor(light, rel, p, a);
|
||||
mDrawer->SetColor(gldecal->light, gldecal->rel, gldecal->colormap, gldecal->a);
|
||||
// for additively drawn decals we must temporarily set the fog color to black.
|
||||
PalEntry fc = gl_RenderState.GetFogColor();
|
||||
if (decal->RenderStyle.BlendOp == STYLEOP_Add && decal->RenderStyle.DestAlpha == STYLEALPHA_One)
|
||||
|
@ -313,18 +352,12 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
gl_RenderState.SetFog(0, -1);
|
||||
}
|
||||
|
||||
gl_RenderState.SetNormal(glseg.Normal());
|
||||
|
||||
FQuadDrawer qd;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
qd.Set(i, dv[i].x, dv[i].z, dv[i].y, dv[i].u, dv[i].v);
|
||||
}
|
||||
gl_RenderState.SetNormal(wall->glseg.Normal());
|
||||
|
||||
if (wall->lightlist == nullptr)
|
||||
{
|
||||
gl_RenderState.Apply();
|
||||
qd.Render(GL_TRIANGLE_FAN);
|
||||
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, gldecal->vertindex, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -334,6 +367,7 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
{
|
||||
secplane_t &lowplane = k == lightlist.Size() - 1 ? wall->bottomplane : lightlist[k + 1].plane;
|
||||
|
||||
DecalVertex *dv = gldecal->dv;
|
||||
float low1 = lowplane.ZatPoint(dv[1].x, dv[1].y);
|
||||
float low2 = lowplane.ZatPoint(dv[2].x, dv[2].y);
|
||||
|
||||
|
@ -343,13 +377,13 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
|||
FColormap thiscm;
|
||||
thiscm.FadeColor = wall->Colormap.FadeColor;
|
||||
thiscm.CopyFrom3DLight(&lightlist[k]);
|
||||
mDrawer->SetColor(thisll, rel, thiscm, a);
|
||||
mDrawer->SetColor(thisll, gldecal->rel, thiscm, gldecal->a);
|
||||
if (level.flags3 & LEVEL3_NOCOLOREDSPRITELIGHTING) thiscm.Decolorize();
|
||||
mDrawer->SetFog(thisll, rel, &thiscm, wall->RenderStyle == STYLE_Add);
|
||||
mDrawer->SetFog(thisll, gldecal->rel, &thiscm, wall->RenderStyle == STYLE_Add);
|
||||
gl_RenderState.SetSplitPlanes(lightlist[k].plane, lowplane);
|
||||
|
||||
gl_RenderState.Apply();
|
||||
qd.Render(GL_TRIANGLE_FAN);
|
||||
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, gldecal->vertindex, 4);
|
||||
}
|
||||
if (low1 <= dv[0].z && low2 <= dv[3].z) break;
|
||||
}
|
||||
|
@ -391,7 +425,6 @@ void FDrawInfo::DoDrawDecals(GLWall *wall)
|
|||
{
|
||||
gl_RenderState.EnableSplit(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
#include "r_data/colormaps.h"
|
||||
#include "hwrenderer/scene/hw_drawstructs.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
|
||||
struct GLHorizonInfo;
|
||||
struct F3DFloor;
|
||||
|
|
|
@ -54,7 +54,7 @@ FDynLightData lightdata;
|
|||
|
||||
void FDrawInfo::RenderWall(GLWall *wall, int textured)
|
||||
{
|
||||
assert(vertcount > 0);
|
||||
assert(wall->vertcount > 0);
|
||||
gl_RenderState.Apply();
|
||||
gl_RenderState.ApplyLightIndex(wall->dynlightindex);
|
||||
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, wall->vertindex, wall->vertcount);
|
||||
|
@ -362,6 +362,7 @@ void FDrawInfo::AddWall(GLWall *wall)
|
|||
wall->MakeVertices(this, false);
|
||||
auto newwall = drawlists[list].NewWall();
|
||||
*newwall = *wall;
|
||||
if (!masked) newwall->ProcessDecals(this);
|
||||
}
|
||||
wall->dynlightindex = -1;
|
||||
}
|
||||
|
@ -383,6 +384,7 @@ void FDrawInfo::AddMirrorSurface(GLWall *w)
|
|||
tcs[GLWall::LOLFT].u = tcs[GLWall::LORGT].u = tcs[GLWall::UPLFT].u = tcs[GLWall::UPRGT].u = v.X;
|
||||
tcs[GLWall::LOLFT].v = tcs[GLWall::LORGT].v = tcs[GLWall::UPLFT].v = tcs[GLWall::UPRGT].v = v.Z;
|
||||
newwall->MakeVertices(this, false);
|
||||
newwall->ProcessDecals(this);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -481,10 +481,9 @@ void OpenGLFrameBuffer::SetClearColor(int color)
|
|||
//
|
||||
//
|
||||
//==========================================================================
|
||||
bool OpenGLFrameBuffer::Begin2D(bool copy3d)
|
||||
void OpenGLFrameBuffer::Begin2D(bool copy3d)
|
||||
{
|
||||
Super::Begin2D(copy3d);
|
||||
ClearClipRect();
|
||||
gl_RenderState.mViewMatrix.loadIdentity();
|
||||
gl_RenderState.mProjectionMatrix.ortho(0, GetWidth(), GetHeight(), 0, -1.0f, 1.0f);
|
||||
gl_RenderState.ApplyMatrices();
|
||||
|
@ -503,7 +502,6 @@ bool OpenGLFrameBuffer::Begin2D(bool copy3d)
|
|||
|
||||
if (GLRenderer != NULL)
|
||||
GLRenderer->Begin2D();
|
||||
return true;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
PalEntry *GetPalette () override;
|
||||
bool SetFlash(PalEntry rgb, int amount) override;
|
||||
void GetFlash(PalEntry &rgb, int &amount) override;
|
||||
bool Begin2D(bool copy3d) override;
|
||||
void Begin2D(bool copy3d) override;
|
||||
void GameRestart() override;
|
||||
void InitForLevel() override;
|
||||
void SetClearColor(int color) override;
|
||||
|
|
|
@ -6,6 +6,7 @@ struct FSectorPortalGroup;
|
|||
struct FLinePortalSpan;
|
||||
struct FFlatVertex;
|
||||
class GLWall;
|
||||
struct GLDecal;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -127,6 +128,7 @@ public:
|
|||
virtual void AddWall(GLWall *w) = 0;
|
||||
virtual void AddPortal(GLWall *w, int portaltype) = 0;
|
||||
virtual void AddMirrorSurface(GLWall *w) = 0;
|
||||
virtual void AddDecal(GLDecal *d) = 0;
|
||||
virtual void ProcessActorsInPortal(FLinePortalSpan *glport) = 0;
|
||||
virtual std::pair<FFlatVertex *, unsigned int> AllocVertices(unsigned int count) = 0;
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#include "textures/textures.h"
|
||||
#include "r_data/colormaps.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
|
||||
struct GLHorizonInfo;
|
||||
struct GLSkyInfo;
|
||||
|
@ -234,6 +236,8 @@ public:
|
|||
float fch1, float fch2, float ffh1, float ffh2,
|
||||
float bch1, float bch2, float bfh1, float bfh2);
|
||||
|
||||
void ProcessDecal(HWDrawInfo *di, DBaseDecal *decal);
|
||||
void ProcessDecals(HWDrawInfo *di);
|
||||
|
||||
void CreateVertices(FFlatVertex *&ptr, bool nosplit);
|
||||
void SplitLeftEdge (FFlatVertex *&ptr);
|
||||
|
|
|
@ -229,8 +229,7 @@ void DIntermissionScreenFader::Drawer ()
|
|||
if (mType == FADE_In) factor = 1.0 - factor;
|
||||
int color = MAKEARGB(int(factor*255), 0,0,0);
|
||||
|
||||
if (screen->Begin2D(false))
|
||||
{
|
||||
screen->Begin2D(false);
|
||||
screen->DrawTexture (TexMan[mBackground], 0, 0, DTA_Fullscreen, true, DTA_ColorOverlay, color, TAG_DONE);
|
||||
for (unsigned i=0; i < mOverlays.Size(); i++)
|
||||
{
|
||||
|
@ -239,12 +238,6 @@ void DIntermissionScreenFader::Drawer ()
|
|||
}
|
||||
screen->FillBorder (NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
V_SetBlend (0,0,0,int(256*factor));
|
||||
Super::Drawer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -58,7 +58,8 @@ FRenderStyle LegacyRenderStyles[STYLE_Count] =
|
|||
{ { STYLEOP_RevSub, STYLEALPHA_Src, STYLEALPHA_One, 0 } }, /* STYLE_Subtract*/
|
||||
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_ColorIsFixed } }, /* STYLE_AddStencil */
|
||||
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed } }, /* STYLE_AddShaded */
|
||||
{ { STYLEOP_Add, STYLEALPHA_InvDstCol, STYLEALPHA_Zero, 0 } }, /* STYLE_Multiply */
|
||||
{ { STYLEOP_Add, STYLEALPHA_DstCol, STYLEALPHA_Zero, 0 } }, /* STYLE_Multiply */
|
||||
{ { STYLEOP_Add, STYLEALPHA_InvDstCol, STYLEALPHA_Zero, 0 } }, /* STYLE_InverseMultiply */
|
||||
};
|
||||
|
||||
double GetAlpha(int type, double alpha)
|
||||
|
|
|
@ -62,6 +62,7 @@ enum ERenderStyle
|
|||
STYLE_AddStencil, // Fill image interior with alphacolor
|
||||
STYLE_AddShaded, // Treat patch data as alpha values for alphacolor
|
||||
STYLE_Multiply, // Multiply source with destination (HW renderer only.)
|
||||
STYLE_InverseMultiply, // Multiply source with inverse of destination (HW renderer only.)
|
||||
|
||||
STYLE_Count
|
||||
};
|
||||
|
|
|
@ -859,11 +859,10 @@ void DFrameBuffer::SetBlendingRect (int x1, int y1, int x2, int y2)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool DFrameBuffer::Begin2D (bool copy3d)
|
||||
void DFrameBuffer::Begin2D (bool copy3d)
|
||||
{
|
||||
isIn2D = true;
|
||||
ClearClipRect();
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -385,7 +385,7 @@ public:
|
|||
|
||||
// Begin 2D drawing operations.
|
||||
// Returns true if hardware-accelerated 2D has been entered, false if not.
|
||||
virtual bool Begin2D(bool copy3d);
|
||||
virtual void Begin2D(bool copy3d);
|
||||
void End2D() { isIn2D = false; }
|
||||
|
||||
// Returns true if Begin2D has been called and 2D drawing is now active
|
||||
|
|
|
@ -504,7 +504,7 @@ void main()
|
|||
|
||||
case 4: // simple 2D (reuses a uniform for the special colormap for the color overlay.)
|
||||
{
|
||||
frag = frag * vColor;
|
||||
frag = frag * ProcessLight(vColor);
|
||||
frag.rgb = frag.rgb + uFixedColormapStart.rgb;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue