- disable the native part of coronas as well.

This commit is contained in:
Christoph Oelckers 2022-10-20 07:48:02 +02:00
parent 80a31b074d
commit 457b9b71d9
5 changed files with 12 additions and 2 deletions

View file

@ -24,9 +24,11 @@
#include "a_corona.h" #include "a_corona.h"
#include "a_dynlight.h" #include "a_dynlight.h"
#if 0
IMPLEMENT_CLASS(ACorona, false, false) IMPLEMENT_CLASS(ACorona, false, false)
void ACorona::Tick() void ACorona::Tick()
{ {
Super::Tick(); Super::Tick();
} }
#endif

View file

@ -27,6 +27,7 @@ EXTERN_CVAR(Bool, gl_coronas)
class AActor; class AActor;
#if 0
class ACorona : public AActor class ACorona : public AActor
{ {
DECLARE_CLASS(ACorona, AActor) DECLARE_CLASS(ACorona, AActor)
@ -36,3 +37,4 @@ public:
float CoronaFade = 0.0f; float CoronaFade = 0.0f;
}; };
#endif

View file

@ -171,7 +171,7 @@ void HWDrawInfo::StartScene(FRenderViewpoint &parentvp, HWViewpointUniforms *uni
for (int i = 0; i < GLDL_TYPES; i++) drawlists[i].Reset(); for (int i = 0; i < GLDL_TYPES; i++) drawlists[i].Reset();
hudsprites.Clear(); hudsprites.Clear();
Coronas.Clear(); // Coronas.Clear();
vpIndex = 0; vpIndex = 0;
// Fullbright information needs to be propagated from the main view. // Fullbright information needs to be propagated from the main view.
@ -580,6 +580,7 @@ void HWDrawInfo::RenderPortal(HWPortal *p, FRenderState &state, bool usestencil)
void HWDrawInfo::DrawCorona(FRenderState& state, ACorona* corona, double dist) void HWDrawInfo::DrawCorona(FRenderState& state, ACorona* corona, double dist)
{ {
#if 0
spriteframe_t* sprframe = &SpriteFrames[sprites[corona->sprite].spriteframes + (size_t)corona->SpawnState->GetFrame()]; spriteframe_t* sprframe = &SpriteFrames[sprites[corona->sprite].spriteframes + (size_t)corona->SpawnState->GetFrame()];
FTextureID patch = sprframe->Texture[0]; FTextureID patch = sprframe->Texture[0];
if (!patch.isValid()) return; if (!patch.isValid()) return;
@ -641,6 +642,7 @@ void HWDrawInfo::DrawCorona(FRenderState& state, ACorona* corona, double dist)
vp[3].Set(x1, y1, 1.0f, u1, v1); vp[3].Set(x1, y1, 1.0f, u1, v1);
state.Draw(DT_TriangleStrip, vertexindex, 4); state.Draw(DT_TriangleStrip, vertexindex, 4);
#endif
} }
static ETraceStatus CheckForViewpointActor(FTraceResults& res, void* userdata) static ETraceStatus CheckForViewpointActor(FTraceResults& res, void* userdata)
@ -668,6 +670,7 @@ void HWDrawInfo::DrawCoronas(FRenderState& state)
float timeElapsed = (screen->FrameTime - LastFrameTime) / 1000.0f; float timeElapsed = (screen->FrameTime - LastFrameTime) / 1000.0f;
LastFrameTime = screen->FrameTime; LastFrameTime = screen->FrameTime;
#if 0
for (ACorona* corona : Coronas) for (ACorona* corona : Coronas)
{ {
auto cPos = corona->Vec3Offset(0., 0., corona->Height * 0.5); auto cPos = corona->Vec3Offset(0., 0., corona->Height * 0.5);
@ -694,6 +697,7 @@ void HWDrawInfo::DrawCoronas(FRenderState& state)
if (corona->CoronaFade > 0.0f) if (corona->CoronaFade > 0.0f)
DrawCorona(state, corona, dist); DrawCorona(state, corona, dist);
} }
#endif
state.SetTextureMode(TM_NORMAL); state.SetTextureMode(TM_NORMAL);
screen->mViewpoints->Bind(state, vpIndex); screen->mViewpoints->Bind(state, vpIndex);

View file

@ -151,7 +151,7 @@ struct HWDrawInfo
TArray<HWPortal *> Portals; TArray<HWPortal *> Portals;
TArray<HWDecal *> Decals[2]; // the second slot is for mirrors which get rendered in a separate pass. TArray<HWDecal *> Decals[2]; // the second slot is for mirrors which get rendered in a separate pass.
TArray<HUDSprite> hudsprites; // These may just be stored by value. TArray<HUDSprite> hudsprites; // These may just be stored by value.
TArray<ACorona*> Coronas; //TArray<ACorona*> Coronas;
uint64_t LastFrameTime = 0; uint64_t LastFrameTime = 0;
TArray<MissingTextureInfo> MissingUpperTextures; TArray<MissingTextureInfo> MissingUpperTextures;

View file

@ -704,11 +704,13 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
return; return;
} }
#if 0
if (thing->IsKindOf(NAME_Corona)) if (thing->IsKindOf(NAME_Corona))
{ {
di->Coronas.Push(static_cast<ACorona*>(thing)); di->Coronas.Push(static_cast<ACorona*>(thing));
return; return;
} }
#endif
const auto &vp = di->Viewpoint; const auto &vp = di->Viewpoint;
AActor *camera = vp.camera; AActor *camera = vp.camera;