mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
Decal work. Not finished yet.
This commit is contained in:
parent
bbea6e7e3c
commit
200848a487
6 changed files with 173 additions and 133 deletions
|
@ -555,6 +555,7 @@ bool FDrawInfo::PutWallCompat(GLWall *wall, int passflag)
|
||||||
int list = list_indices[masked][foggy];
|
int list = list_indices[masked][foggy];
|
||||||
auto newwall = dldrawlists[list].NewWall();
|
auto newwall = dldrawlists[list].NewWall();
|
||||||
*newwall = *wall;
|
*newwall = *wall;
|
||||||
|
if (!masked) newwall->ProcessDecals(this);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,51 +46,45 @@ struct DecalVertex
|
||||||
float u,v;
|
float u,v;
|
||||||
};
|
};
|
||||||
|
|
||||||
//==========================================================================
|
struct GLDecal
|
||||||
//
|
{
|
||||||
//
|
unsigned int vertindex;
|
||||||
//
|
FMaterial *gltexture;
|
||||||
//==========================================================================
|
GLWall *wall;
|
||||||
void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
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;
|
line_t * line = seg->linedef;
|
||||||
side_t * side = seg->sidedef;
|
side_t * side = seg->sidedef;
|
||||||
int i;
|
int i;
|
||||||
float zpos;
|
float zpos;
|
||||||
int light;
|
|
||||||
int rel;
|
|
||||||
float a;
|
|
||||||
bool flipx, flipy;
|
bool flipx, flipy;
|
||||||
DecalVertex dv[4];
|
|
||||||
FTextureID decalTile;
|
FTextureID decalTile;
|
||||||
|
GLDecal gldecal;
|
||||||
|
|
||||||
|
|
||||||
if (decal->RenderFlags & RF_INVISIBLE) return;
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
decalTile = decal->PicNum;
|
||||||
|
flipx = !!(decal->RenderFlags & RF_XFLIP);
|
||||||
|
flipy = !!(decal->RenderFlags & RF_YFLIP);
|
||||||
|
|
||||||
//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];
|
FTexture *texture = TexMan[decalTile];
|
||||||
if (texture == NULL) return;
|
if (texture == NULL) return;
|
||||||
|
|
||||||
FMaterial *tex;
|
|
||||||
|
|
||||||
|
|
||||||
tex = FMaterial::ValidateTexture(texture, true);
|
|
||||||
|
|
||||||
|
|
||||||
// the sectors are only used for their texture origin coordinates
|
// the sectors are only used for their texture origin coordinates
|
||||||
// so we don't need the fake sectors for deep water etc.
|
// so we don't need the fake sectors for deep water etc.
|
||||||
|
@ -104,76 +98,80 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
||||||
|
|
||||||
switch (decal->RenderFlags & RF_RELMASK)
|
switch (decal->RenderFlags & RF_RELMASK)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// No valid decal can have this type. If one is encountered anyway
|
// No valid decal can have this type. If one is encountered anyway
|
||||||
// it is in some way invalid so skip it.
|
// it is in some way invalid so skip it.
|
||||||
return;
|
return;
|
||||||
//zpos = decal->z;
|
//zpos = decal->z;
|
||||||
//break;
|
//break;
|
||||||
|
|
||||||
case RF_RELUPPER:
|
case RF_RELUPPER:
|
||||||
if (wall->type != RENDERWALL_TOP) return;
|
if (type != RENDERWALL_TOP) return;
|
||||||
if (line->flags & ML_DONTPEGTOP)
|
if (line->flags & ML_DONTPEGTOP)
|
||||||
{
|
{
|
||||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zpos = decal->Z + seg->backsector->GetPlaneTexZ(sector_t::ceiling);
|
zpos = decal->Z + seg->backsector->GetPlaneTexZ(sector_t::ceiling);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RF_RELLOWER:
|
case RF_RELLOWER:
|
||||||
if (wall->type != RENDERWALL_BOTTOM) return;
|
if (type != RENDERWALL_BOTTOM) return;
|
||||||
if (line->flags & ML_DONTPEGBOTTOM)
|
if (line->flags & ML_DONTPEGBOTTOM)
|
||||||
{
|
{
|
||||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zpos = decal->Z + seg->backsector->GetPlaneTexZ(sector_t::floor);
|
zpos = decal->Z + seg->backsector->GetPlaneTexZ(sector_t::floor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RF_RELMID:
|
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)
|
if (line->flags & ML_DONTPEGBOTTOM)
|
||||||
{
|
{
|
||||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::floor);
|
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::floor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
zpos = decal->Z + frontsector->GetPlaneTexZ(sector_t::ceiling);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&gldecal, 0, sizeof(gldecal));
|
||||||
|
gldecal.gltexture = FMaterial::ValidateTexture(texture, true);
|
||||||
|
gldecal.wall = this;
|
||||||
|
gldecal.decal = decal;
|
||||||
|
|
||||||
if (decal->RenderFlags & RF_FULLBRIGHT)
|
if (decal->RenderFlags & RF_FULLBRIGHT)
|
||||||
{
|
{
|
||||||
light = 255;
|
gldecal.light = 255;
|
||||||
rel = 0;
|
gldecal.rel = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
light = wall->lightlevel;
|
gldecal.light = lightlevel;
|
||||||
rel = wall->rellight + getExtraLight();
|
gldecal.rel = rellight + getExtraLight();
|
||||||
}
|
}
|
||||||
|
|
||||||
FColormap p = wall->Colormap;
|
gldecal.colormap = Colormap;
|
||||||
|
|
||||||
if (level.flags3 & LEVEL3_NOCOLOREDSPRITELIGHTING)
|
if (level.flags3 & LEVEL3_NOCOLOREDSPRITELIGHTING)
|
||||||
{
|
{
|
||||||
p.Decolorize();
|
gldecal.colormap.Decolorize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gldecal.a = decal->Alpha;
|
||||||
|
|
||||||
a = decal->Alpha;
|
|
||||||
|
|
||||||
// now clip the decal to the actual polygon
|
// now clip the decal to the actual polygon
|
||||||
|
FMaterial *tex = gldecal.gltexture;
|
||||||
|
|
||||||
float decalwidth = tex->TextureWidth() * decal->ScaleX;
|
float decalwidth = tex->TextureWidth() * decal->ScaleX;
|
||||||
float decalheight = tex->TextureHeight() * decal->ScaleY;
|
float decalheight = tex->TextureHeight() * decal->ScaleY;
|
||||||
float decallefto = tex->GetLeftOffset() * decal->ScaleX;
|
float decallefto = tex->GetLeftOffset() * decal->ScaleX;
|
||||||
float decaltopo = tex->GetTopOffset() * decal->ScaleY;
|
float decaltopo = tex->GetTopOffset() * decal->ScaleY;
|
||||||
|
|
||||||
auto &glseg = wall->glseg;
|
|
||||||
float leftedge = glseg.fracleft * side->TexelLength;
|
float leftedge = glseg.fracleft * side->TexelLength;
|
||||||
float linelength = glseg.fracright * side->TexelLength - leftedge;
|
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 vx = (glseg.x2 - glseg.x1) / linelength;
|
||||||
float vy = (glseg.y2 - glseg.y1) / linelength;
|
float vy = (glseg.y2 - glseg.y1) / linelength;
|
||||||
|
|
||||||
|
DecalVertex *dv = gldecal.dv;
|
||||||
dv[1].x = dv[0].x = glseg.x1 + vx * left;
|
dv[1].x = dv[0].x = glseg.x1 + vx * left;
|
||||||
dv[1].y = dv[0].y = glseg.y1 + vy * 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();
|
dv[0].v = dv[3].v = tex->GetVB();
|
||||||
|
|
||||||
// now clip to the top plane
|
// now clip to the top plane
|
||||||
float vzt = (wall->ztop[1] - wall->ztop[0]) / linelength;
|
float vzt = (ztop[1] - ztop[0]) / linelength;
|
||||||
float topleft = wall->ztop[0] + vzt * left;
|
float topleft = ztop[0] + vzt * left;
|
||||||
float topright = wall->ztop[0] + vzt * right;
|
float topright = ztop[0] + vzt * right;
|
||||||
|
|
||||||
// completely below the wall
|
// completely below the wall
|
||||||
if (topleft < dv[0].z && topright < dv[3].z)
|
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
|
// now clip to the bottom plane
|
||||||
float vzb = (wall->zbottom[1] - wall->zbottom[0]) / linelength;
|
float vzb = (zbottom[1] - zbottom[0]) / linelength;
|
||||||
float bottomleft = wall->zbottom[0] + vzb * left;
|
float bottomleft = zbottom[0] + vzb * left;
|
||||||
float bottomright = wall->zbottom[0] + vzb * right;
|
float bottomright = zbottom[0] + vzb * right;
|
||||||
|
|
||||||
// completely above the wall
|
// completely above the wall
|
||||||
if (bottomleft > dv[1].z && bottomright > dv[2].z)
|
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;
|
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.
|
// calculate dynamic light effect.
|
||||||
if (gl_lights && GLRenderer->mLightCount && !mDrawer->FixedColormap && gl_light_sprites)
|
if (gl_lights && GLRenderer->mLightCount && !mDrawer->FixedColormap && gl_light_sprites)
|
||||||
{
|
{
|
||||||
// Note: This should be replaced with proper shader based lighting.
|
// Note: This should be replaced with proper shader based lighting.
|
||||||
double x, y;
|
double x, y;
|
||||||
decal->GetXY(seg->sidedef, 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.
|
// 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_RenderState.SetObjectColor(decal->AlphaColor | 0xff000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gl_SetRenderStyle(decal->RenderStyle, false, false);
|
gl_SetRenderStyle(decal->RenderStyle, false, false);
|
||||||
gl_RenderState.SetMaterial(tex, CLAMP_XY, decal->Translation, 0, !!(decal->RenderStyle.Flags & STYLEF_RedIsAlpha));
|
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);
|
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.
|
// for additively drawn decals we must temporarily set the fog color to black.
|
||||||
PalEntry fc = gl_RenderState.GetFogColor();
|
PalEntry fc = gl_RenderState.GetFogColor();
|
||||||
if (decal->RenderStyle.BlendOp == STYLEOP_Add && decal->RenderStyle.DestAlpha == STYLEALPHA_One)
|
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.SetFog(0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_RenderState.SetNormal(glseg.Normal());
|
gl_RenderState.SetNormal(wall->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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wall->lightlist == nullptr)
|
if (wall->lightlist == nullptr)
|
||||||
{
|
{
|
||||||
gl_RenderState.Apply();
|
gl_RenderState.Apply();
|
||||||
qd.Render(GL_TRIANGLE_FAN);
|
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, gldecal->vertindex, 4);
|
||||||
}
|
}
|
||||||
else
|
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;
|
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 low1 = lowplane.ZatPoint(dv[1].x, dv[1].y);
|
||||||
float low2 = lowplane.ZatPoint(dv[2].x, dv[2].y);
|
float low2 = lowplane.ZatPoint(dv[2].x, dv[2].y);
|
||||||
|
|
||||||
|
@ -343,13 +377,13 @@ void FDrawInfo::DrawDecal(GLWall *wall, DBaseDecal *decal)
|
||||||
FColormap thiscm;
|
FColormap thiscm;
|
||||||
thiscm.FadeColor = wall->Colormap.FadeColor;
|
thiscm.FadeColor = wall->Colormap.FadeColor;
|
||||||
thiscm.CopyFrom3DLight(&lightlist[k]);
|
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();
|
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.SetSplitPlanes(lightlist[k].plane, lowplane);
|
||||||
|
|
||||||
gl_RenderState.Apply();
|
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;
|
if (low1 <= dv[0].z && low2 <= dv[3].z) break;
|
||||||
}
|
}
|
||||||
|
@ -391,7 +425,6 @@ void FDrawInfo::DoDrawDecals(GLWall *wall)
|
||||||
{
|
{
|
||||||
gl_RenderState.EnableSplit(false);
|
gl_RenderState.EnableSplit(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -461,6 +461,7 @@ void FDrawInfo::AddWall(GLWall *wall)
|
||||||
wall->MakeVertices(this, false);
|
wall->MakeVertices(this, false);
|
||||||
auto newwall = drawlists[list].NewWall();
|
auto newwall = drawlists[list].NewWall();
|
||||||
*newwall = *wall;
|
*newwall = *wall;
|
||||||
|
if (!masked) newwall->ProcessDecals(this);
|
||||||
}
|
}
|
||||||
wall->dynlightindex = -1;
|
wall->dynlightindex = -1;
|
||||||
}
|
}
|
||||||
|
@ -482,6 +483,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].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;
|
tcs[GLWall::LOLFT].v = tcs[GLWall::LORGT].v = tcs[GLWall::UPLFT].v = tcs[GLWall::UPRGT].v = v.Z;
|
||||||
newwall->MakeVertices(this, false);
|
newwall->MakeVertices(this, false);
|
||||||
|
newwall->ProcessDecals(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -6,6 +6,7 @@ struct FSectorPortalGroup;
|
||||||
struct FLinePortalSpan;
|
struct FLinePortalSpan;
|
||||||
struct FFlatVertex;
|
struct FFlatVertex;
|
||||||
class GLWall;
|
class GLWall;
|
||||||
|
struct GLDecal;
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
@ -127,6 +128,7 @@ public:
|
||||||
virtual void AddWall(GLWall *w) = 0;
|
virtual void AddWall(GLWall *w) = 0;
|
||||||
virtual void AddPortal(GLWall *w, int portaltype) = 0;
|
virtual void AddPortal(GLWall *w, int portaltype) = 0;
|
||||||
virtual void AddMirrorSurface(GLWall *w) = 0;
|
virtual void AddMirrorSurface(GLWall *w) = 0;
|
||||||
|
virtual void AddDecal(GLDecal *d) = 0;
|
||||||
virtual void ProcessActorsInPortal(FLinePortalSpan *glport) = 0;
|
virtual void ProcessActorsInPortal(FLinePortalSpan *glport) = 0;
|
||||||
virtual std::pair<FFlatVertex *, unsigned int> AllocVertices(unsigned int count) = 0;
|
virtual std::pair<FFlatVertex *, unsigned int> AllocVertices(unsigned int count) = 0;
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,8 @@ public:
|
||||||
float fch1, float fch2, float ffh1, float ffh2,
|
float fch1, float fch2, float ffh1, float ffh2,
|
||||||
float bch1, float bch2, float bfh1, float bfh2);
|
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 CreateVertices(FFlatVertex *&ptr, bool nosplit);
|
||||||
void SplitLeftEdge (FFlatVertex *&ptr);
|
void SplitLeftEdge (FFlatVertex *&ptr);
|
||||||
|
|
Loading…
Reference in a new issue