- fixed: Polymost must set the viewpoint if renderers are switched.

- fixed coordinate order in renderSetViewpoint
- fixed backwall checks accidentally testing wall 0 instead of the current wall.
This commit is contained in:
Christoph Oelckers 2021-03-18 00:28:38 +01:00
parent 493294909b
commit 2d958745b4
3 changed files with 4 additions and 2 deletions

View file

@ -2075,6 +2075,7 @@ void polymost_drawrooms()
GLInterface.EnableDepthTest(true); GLInterface.EnableDepthTest(true);
GLInterface.SetDepthFunc(DF_LEqual); GLInterface.SetDepthFunc(DF_LEqual);
GLInterface.SetRenderStyle(LegacyRenderStyles[STYLE_Translucent]); GLInterface.SetRenderStyle(LegacyRenderStyles[STYLE_Translucent]);
renderSetViewpoint(0, 0, 0);
gvrcorrection = viewingrange*(1.f/65536.f); gvrcorrection = viewingrange*(1.f/65536.f);
//if (glprojectionhacks == 2) //if (glprojectionhacks == 2)

View file

@ -921,7 +921,7 @@ void HWWall::DoMidTexture(HWDrawInfo* di, walltype* wal,
//========================================================================== //==========================================================================
void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sectortype* backsector) void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sectortype* backsector)
{ {
auto backwall = wall->nextwall >= 0 && wall->nextwall < numwalls? &wall[wal->nextwall] : nullptr; auto backwall = wal->nextwall >= 0 && wal->nextwall < numwalls? &wall[wal->nextwall] : nullptr;
auto p2wall = &wall[wal->point2]; auto p2wall = &wall[wal->point2];
float fch1; float fch1;

View file

@ -189,6 +189,7 @@ bool PolymostRenderState::Apply(FRenderState& state, GLState& oldState)
else else
{ {
state.EnableFog(0); state.EnableFog(0);
state.SetFog(0, 0);
state.SetSoftLightLevel(ShadeDiv >= 1 / 1000.f ? 255 - Scale(Shade, 255, numshades) : 255); state.SetSoftLightLevel(ShadeDiv >= 1 / 1000.f ? 255 - Scale(Shade, 255, numshades) : 255);
state.SetLightParms(VisFactor, ShadeDiv / (numshades - 2)); state.SetLightParms(VisFactor, ShadeDiv / (numshades - 2));
} }
@ -391,7 +392,7 @@ void renderSetVisibility(float vis)
void renderSetViewpoint(float x, float y, float z) void renderSetViewpoint(float x, float y, float z)
{ {
vp.mCameraPos = {x, y, z, 0}; vp.mCameraPos = {x, z, y, 0};
} }
void renderBeginScene() void renderBeginScene()