mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- removed all the decal stubs.
Build has wall sprite for decals so this is redundant and ultimately not usable.
This commit is contained in:
parent
d0f38d7362
commit
efe0d57fca
5 changed files with 1 additions and 86 deletions
|
@ -188,8 +188,6 @@ HWDrawInfo *HWDrawInfo::EndDrawInfo()
|
|||
void HWDrawInfo::ClearBuffers()
|
||||
{
|
||||
spriteindex = 0;
|
||||
Decals[0].Clear();
|
||||
Decals[1].Clear();
|
||||
mClipPortal = nullptr;
|
||||
mCurrentPortal = nullptr;
|
||||
}
|
||||
|
@ -272,17 +270,6 @@ HWPortal * HWDrawInfo::FindPortal(const void * src)
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
HWDecal* HWDrawInfo::AddDecal(bool onmirror)
|
||||
{
|
||||
#if 0
|
||||
auto decal = (HWDecal*)RenderDataAllocator.Alloc(sizeof(HWDecal));
|
||||
Decals[onmirror ? 1 : 0].Push(decal);
|
||||
return decal;
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void HWDrawInfo::DispatchSprites()
|
||||
{
|
||||
for (int i = 0; i < spritesortcnt; i++)
|
||||
|
@ -482,12 +469,7 @@ void HWDrawInfo::RenderScene(FRenderState &state)
|
|||
|
||||
state.SetRenderStyle(STYLE_Translucent);
|
||||
|
||||
// Part 4: Draw decals (not a real pass)
|
||||
state.SetDepthFunc(DF_LEqual);
|
||||
#if 0
|
||||
DrawDecals(state, Decals[0]);
|
||||
#endif
|
||||
|
||||
RenderAll.Unclock();
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ struct FFlatVertex;
|
|||
class HWWall;
|
||||
class HWFlat;
|
||||
class HWSprite;
|
||||
struct HWDecal;
|
||||
class IShadowMap;
|
||||
struct FDynLightData;
|
||||
class Clipper;
|
||||
|
@ -107,7 +106,6 @@ struct HWDrawInfo
|
|||
FRenderViewpoint Viewpoint;
|
||||
HWViewpointUniforms VPUniforms; // per-viewpoint uniform state
|
||||
TArray<HWPortal *> Portals;
|
||||
TArray<HWDecal *> Decals[2]; // the second slot is for mirrors which get rendered in a separate pass.
|
||||
|
||||
// This is needed by the BSP traverser.
|
||||
bool multithread;
|
||||
|
@ -171,7 +169,6 @@ public:
|
|||
void SetupView(FRenderState &state, float vx, float vy, float vz, bool mirror, bool planemirror);
|
||||
angle_t FrustumAngle();
|
||||
|
||||
void DrawDecals(FRenderState &state, TArray<HWDecal *> &decals);
|
||||
void DrawPlayerSprites(bool hudModelStep, FRenderState &state);
|
||||
|
||||
//void AddSubsectorToPortal(FSectorPortalGroup *portal, sectortype *sub);
|
||||
|
@ -182,8 +179,6 @@ public:
|
|||
void AddSprite(HWSprite *sprite, bool translucent);
|
||||
|
||||
|
||||
HWDecal *AddDecal(bool onmirror);
|
||||
|
||||
bool isSoftwareLighting() const
|
||||
{
|
||||
return true;// lightmode == ELightMode::ZDoomSoftware || lightmode == ELightMode::DoomSoftware || lightmode == ELightMode::Build;
|
||||
|
|
|
@ -80,16 +80,7 @@ void HWDrawInfo::AddMirrorSurface(HWWall *w)
|
|||
tcs[HWWall::LOLFT].u = tcs[HWWall::LORGT].u = tcs[HWWall::UPLFT].u = tcs[HWWall::UPRGT].u = v.X;
|
||||
tcs[HWWall::LOLFT].v = tcs[HWWall::LORGT].v = tcs[HWWall::UPLFT].v = tcs[HWWall::UPRGT].v = v.Z;
|
||||
newwall->MakeVertices(this, false);
|
||||
|
||||
#if 0
|
||||
bool hasDecals = newwall->seg->sidedef && newwall->seg->sidedef->AttachedDecals;
|
||||
if (hasDecals && Level->HasDynamicLights && !isFullbrightScene())
|
||||
{
|
||||
newwall->SetupLights(this, lightdata);
|
||||
}
|
||||
newwall->ProcessDecals(this);
|
||||
#endif
|
||||
newwall->dynlightindex = -1; // the environment map should not be affected by lights - only the decals.
|
||||
newwall->dynlightindex = -1; // the environment map should not be affected by lights.
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -25,7 +25,6 @@ struct FDynLightData;
|
|||
class VSMatrix;
|
||||
struct FSpriteModelFrame;
|
||||
class FRenderState;
|
||||
struct HWDecal;
|
||||
|
||||
struct HWSectorPlane
|
||||
{
|
||||
|
@ -215,9 +214,6 @@ public:
|
|||
float fch1, float fch2, float ffh1, float ffh2,
|
||||
float bch1, float bch2, float bfh1, float bfh2);
|
||||
|
||||
//void ProcessDecal(HWDrawInfo *di, DBaseDecal *decal, const FVector3 &normal);
|
||||
//void ProcessDecals(HWDrawInfo *di);
|
||||
|
||||
int CreateVertices(FFlatVertex *&ptr, bool nosplit);
|
||||
|
||||
//int CountVertices();
|
||||
|
@ -339,44 +335,11 @@ public:
|
|||
|
||||
|
||||
|
||||
|
||||
struct DecalVertex
|
||||
{
|
||||
float x, y, z;
|
||||
float u, v;
|
||||
};
|
||||
|
||||
/*
|
||||
struct HWDecal
|
||||
{
|
||||
FGameTexture *texture;
|
||||
TArray<lightlist_t> *lightlist;
|
||||
DBaseDecal *decal;
|
||||
DecalVertex dv[4];
|
||||
float zcenter;
|
||||
unsigned int vertindex;
|
||||
|
||||
FRenderStyle renderstyle;
|
||||
int lightlevel;
|
||||
int rellight;
|
||||
float alpha;
|
||||
FColormap Colormap;
|
||||
int dynlightindex;
|
||||
sectortype *frontsector;
|
||||
FVector3 Normal;
|
||||
|
||||
void DrawDecal(HWDrawInfo *di, FRenderState &state);
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
inline float Dist2(float x1,float y1,float x2,float y2)
|
||||
{
|
||||
return sqrtf((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
|
||||
}
|
||||
|
||||
bool hw_SetPlaneTextureRotation(const HWSectorPlane * secplane, FGameTexture * gltexture, VSMatrix &mat);
|
||||
void hw_GetDynModelLight(AActor *self, FDynLightData &modellightdata);
|
||||
|
||||
extern const float LARGE_VALUE;
|
||||
|
|
|
@ -406,22 +406,6 @@ void HWWall::PutWall(HWDrawInfo *di, bool translucent)
|
|||
MakeVertices(di, translucent);
|
||||
}
|
||||
|
||||
/*
|
||||
bool hasDecals = type != RENDERWALL_M2S && seg->sidedef->AttachedDecals;
|
||||
if (hasDecals)
|
||||
{
|
||||
// If we want to use the light infos for the decal we cannot delay the creation until the render pass.
|
||||
if (screen->BuffersArePersistent())
|
||||
{
|
||||
if (di->Level->HasDynamicLights && !di->isFullbrightScene() && texture != nullptr)
|
||||
{
|
||||
SetupLights(di, lightdata);
|
||||
}
|
||||
}
|
||||
ProcessDecals(di);
|
||||
}
|
||||
*/
|
||||
|
||||
di->AddWall(this);
|
||||
// make sure that following parts of the same linedef do not get this one's vertex and lighting info.
|
||||
vertcount = 0;
|
||||
|
|
Loading…
Reference in a new issue