Skip to content

Commit

Permalink
- fixed sky panning.
Browse files Browse the repository at this point in the history
This picked the wrong overload - to make things robust one of the functions was renamed.
  • Loading branch information
coelckers committed Jun 6, 2022
1 parent c3981e0 commit e86899e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/common/rendering/hwrenderer/data/hw_skydome.cpp
Expand Up @@ -455,7 +455,7 @@ void FSkyVertexBuffer::RenderRow(FRenderState& state, EDrawType prim, int row, T
//
//-----------------------------------------------------------------------------

void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which, PalEntry color)
void FSkyVertexBuffer::DoRenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which, PalEntry color)
{
auto& primStart = which ? mPrimStartBuild : mPrimStartDoom;
if (tex && tex->isValid())
Expand Down Expand Up @@ -510,7 +510,7 @@ void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, float
{
SetupMatrices(tex, x_offset, y_offset, mirror, mode, state.mModelMatrix, state.mTextureMatrix, tiled, xscale, yscale);
}
RenderDome(state, tex, mode, false, color);
DoRenderDome(state, tex, mode, false, color);
}


Expand Down
2 changes: 1 addition & 1 deletion source/common/rendering/hwrenderer/data/hw_skydome.h
Expand Up @@ -90,7 +90,7 @@ class FSkyVertexBuffer
}

void RenderRow(FRenderState& state, EDrawType prim, int row, TArray<unsigned int>& mPrimStart, bool apply = true);
void RenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which, PalEntry color = 0xffffffff);
void DoRenderDome(FRenderState& state, FGameTexture* tex, int mode, bool which, PalEntry color = 0xffffffff);
void RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled, float xscale = 0, float yscale = 0, PalEntry color = 0xffffffff);
void RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2, PalEntry color = 0xffffffff);

Expand Down
2 changes: 1 addition & 1 deletion source/core/rendering/scene/hw_skyportal.cpp
Expand Up @@ -78,7 +78,7 @@ void HWSkyPortal::DrawContents(HWDrawInfo *di, FRenderState &state)
textureMatrix.loadIdentity();
state.EnableTextureMatrix(true);
textureMatrix.scale(1.f, repeat_fac, 1.f);
vertexBuffer->RenderDome(state, origin->texture, FSkyVertexBuffer::SKYMODE_MAINLAYER, true, 0, 0, color);
vertexBuffer->DoRenderDome(state, origin->texture, FSkyVertexBuffer::SKYMODE_MAINLAYER, true, color);
state.EnableTextureMatrix(false);
}
else
Expand Down

0 comments on commit e86899e

Please sign in to comment.