mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 04:20:45 +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()
|
void HWDrawInfo::ClearBuffers()
|
||||||
{
|
{
|
||||||
spriteindex = 0;
|
spriteindex = 0;
|
||||||
Decals[0].Clear();
|
|
||||||
Decals[1].Clear();
|
|
||||||
mClipPortal = nullptr;
|
mClipPortal = nullptr;
|
||||||
mCurrentPortal = 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()
|
void HWDrawInfo::DispatchSprites()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < spritesortcnt; i++)
|
for (int i = 0; i < spritesortcnt; i++)
|
||||||
|
@ -482,12 +469,7 @@ void HWDrawInfo::RenderScene(FRenderState &state)
|
||||||
|
|
||||||
state.SetRenderStyle(STYLE_Translucent);
|
state.SetRenderStyle(STYLE_Translucent);
|
||||||
|
|
||||||
// Part 4: Draw decals (not a real pass)
|
|
||||||
state.SetDepthFunc(DF_LEqual);
|
state.SetDepthFunc(DF_LEqual);
|
||||||
#if 0
|
|
||||||
DrawDecals(state, Decals[0]);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RenderAll.Unclock();
|
RenderAll.Unclock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ struct FFlatVertex;
|
||||||
class HWWall;
|
class HWWall;
|
||||||
class HWFlat;
|
class HWFlat;
|
||||||
class HWSprite;
|
class HWSprite;
|
||||||
struct HWDecal;
|
|
||||||
class IShadowMap;
|
class IShadowMap;
|
||||||
struct FDynLightData;
|
struct FDynLightData;
|
||||||
class Clipper;
|
class Clipper;
|
||||||
|
@ -107,7 +106,6 @@ struct HWDrawInfo
|
||||||
FRenderViewpoint Viewpoint;
|
FRenderViewpoint Viewpoint;
|
||||||
HWViewpointUniforms VPUniforms; // per-viewpoint uniform state
|
HWViewpointUniforms VPUniforms; // per-viewpoint uniform state
|
||||||
TArray<HWPortal *> Portals;
|
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.
|
// This is needed by the BSP traverser.
|
||||||
bool multithread;
|
bool multithread;
|
||||||
|
@ -171,7 +169,6 @@ public:
|
||||||
void SetupView(FRenderState &state, float vx, float vy, float vz, bool mirror, bool planemirror);
|
void SetupView(FRenderState &state, float vx, float vy, float vz, bool mirror, bool planemirror);
|
||||||
angle_t FrustumAngle();
|
angle_t FrustumAngle();
|
||||||
|
|
||||||
void DrawDecals(FRenderState &state, TArray<HWDecal *> &decals);
|
|
||||||
void DrawPlayerSprites(bool hudModelStep, FRenderState &state);
|
void DrawPlayerSprites(bool hudModelStep, FRenderState &state);
|
||||||
|
|
||||||
//void AddSubsectorToPortal(FSectorPortalGroup *portal, sectortype *sub);
|
//void AddSubsectorToPortal(FSectorPortalGroup *portal, sectortype *sub);
|
||||||
|
@ -182,8 +179,6 @@ public:
|
||||||
void AddSprite(HWSprite *sprite, bool translucent);
|
void AddSprite(HWSprite *sprite, bool translucent);
|
||||||
|
|
||||||
|
|
||||||
HWDecal *AddDecal(bool onmirror);
|
|
||||||
|
|
||||||
bool isSoftwareLighting() const
|
bool isSoftwareLighting() const
|
||||||
{
|
{
|
||||||
return true;// lightmode == ELightMode::ZDoomSoftware || lightmode == ELightMode::DoomSoftware || lightmode == ELightMode::Build;
|
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].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;
|
tcs[HWWall::LOLFT].v = tcs[HWWall::LORGT].v = tcs[HWWall::UPLFT].v = tcs[HWWall::UPRGT].v = v.Z;
|
||||||
newwall->MakeVertices(this, false);
|
newwall->MakeVertices(this, false);
|
||||||
|
newwall->dynlightindex = -1; // the environment map should not be affected by lights.
|
||||||
#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.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -25,7 +25,6 @@ struct FDynLightData;
|
||||||
class VSMatrix;
|
class VSMatrix;
|
||||||
struct FSpriteModelFrame;
|
struct FSpriteModelFrame;
|
||||||
class FRenderState;
|
class FRenderState;
|
||||||
struct HWDecal;
|
|
||||||
|
|
||||||
struct HWSectorPlane
|
struct HWSectorPlane
|
||||||
{
|
{
|
||||||
|
@ -215,9 +214,6 @@ 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, const FVector3 &normal);
|
|
||||||
//void ProcessDecals(HWDrawInfo *di);
|
|
||||||
|
|
||||||
int CreateVertices(FFlatVertex *&ptr, bool nosplit);
|
int CreateVertices(FFlatVertex *&ptr, bool nosplit);
|
||||||
|
|
||||||
//int CountVertices();
|
//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)
|
inline float Dist2(float x1,float y1,float x2,float y2)
|
||||||
{
|
{
|
||||||
return sqrtf((x1-x2)*(x1-x2)+(y1-y2)*(y1-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);
|
void hw_GetDynModelLight(AActor *self, FDynLightData &modellightdata);
|
||||||
|
|
||||||
extern const float LARGE_VALUE;
|
extern const float LARGE_VALUE;
|
||||||
|
|
|
@ -406,22 +406,6 @@ void HWWall::PutWall(HWDrawInfo *di, bool translucent)
|
||||||
MakeVertices(di, 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);
|
di->AddWall(this);
|
||||||
// make sure that following parts of the same linedef do not get this one's vertex and lighting info.
|
// make sure that following parts of the same linedef do not get this one's vertex and lighting info.
|
||||||
vertcount = 0;
|
vertcount = 0;
|
||||||
|
|
Loading…
Reference in a new issue