Skip to content

Commit

Permalink
xrRender/D3DUtils.cpp: replaced D3DPT_TRIANGLEFAN with D3DPT_TRIANGLE…
Browse files Browse the repository at this point in the history
…STRIP

xrRender/r__sector.cpp: removed unnecessary macro usage, it's better to
directly use xr_vector.
  • Loading branch information
Xottab-DUTY committed Oct 6, 2018
1 parent e5d87a1 commit 94e0a7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Layers/xrRender/D3DUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1409,15 +1409,15 @@ void CDrawUtilities::DrawSelectionRect(const Ivector2& m_SelStart, const Ivector
pv++;
pv->set(m_SelStart.x * SCREEN_QUALITY, m_SelEnd.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
pv++;
pv->set(m_SelEnd.x * SCREEN_QUALITY, m_SelEnd.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
pv++;
pv->set(m_SelEnd.x * SCREEN_QUALITY, m_SelStart.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
pv++;
pv->set(m_SelEnd.x * SCREEN_QUALITY, m_SelEnd.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
pv++;
Stream->Unlock(4, vs_TL->vb_stride);
// Render it as triangle list
DU_DRAW_RS(D3DRS_CULLMODE, D3DCULL_NONE);
DU_DRAW_SH(RImplementation.m_SelectionShader);
DU_DRAW_DP(D3DPT_TRIANGLEFAN, vs_TL, vBase, 2);
DU_DRAW_DP(D3DPT_TRIANGLESTRIP, vs_TL, vBase, 2);
DU_DRAW_RS(D3DRS_CULLMODE, D3DCULL_CCW);
}

Expand Down
3 changes: 1 addition & 2 deletions src/Layers/xrRender/r__sector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ void CPortal::OnRender()
{
VERIFY(poly.size());
// draw rect
DEFINE_VECTOR(FVF::L, LVec, LVecIt);
static LVec V;
static xr_vector<FVF::L> V;
V.resize(poly.size() + 2);
Fvector C = {0, 0, 0};
for (u32 k = 0; k < poly.size(); k++)
Expand Down

0 comments on commit 94e0a7a

Please sign in to comment.