Skip to content

Commit 94e0a7a

Browse files
committed
xrRender/D3DUtils.cpp: replaced D3DPT_TRIANGLEFAN with D3DPT_TRIANGLESTRIP
xrRender/r__sector.cpp: removed unnecessary macro usage, it's better to directly use xr_vector.
1 parent e5d87a1 commit 94e0a7a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Layers/xrRender/D3DUtils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,15 +1409,15 @@ void CDrawUtilities::DrawSelectionRect(const Ivector2& m_SelStart, const Ivector
14091409
pv++;
14101410
pv->set(m_SelStart.x * SCREEN_QUALITY, m_SelEnd.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
14111411
pv++;
1412-
pv->set(m_SelEnd.x * SCREEN_QUALITY, m_SelEnd.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
1413-
pv++;
14141412
pv->set(m_SelEnd.x * SCREEN_QUALITY, m_SelStart.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
14151413
pv++;
1414+
pv->set(m_SelEnd.x * SCREEN_QUALITY, m_SelEnd.y * SCREEN_QUALITY, m_SelectionRect, 0.f, 0.f);
1415+
pv++;
14161416
Stream->Unlock(4, vs_TL->vb_stride);
14171417
// Render it as triangle list
14181418
DU_DRAW_RS(D3DRS_CULLMODE, D3DCULL_NONE);
14191419
DU_DRAW_SH(RImplementation.m_SelectionShader);
1420-
DU_DRAW_DP(D3DPT_TRIANGLEFAN, vs_TL, vBase, 2);
1420+
DU_DRAW_DP(D3DPT_TRIANGLESTRIP, vs_TL, vBase, 2);
14211421
DU_DRAW_RS(D3DRS_CULLMODE, D3DCULL_CCW);
14221422
}
14231423

src/Layers/xrRender/r__sector.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ void CPortal::OnRender()
3333
{
3434
VERIFY(poly.size());
3535
// draw rect
36-
DEFINE_VECTOR(FVF::L, LVec, LVecIt);
37-
static LVec V;
36+
static xr_vector<FVF::L> V;
3837
V.resize(poly.size() + 2);
3938
Fvector C = {0, 0, 0};
4039
for (u32 k = 0; k < poly.size(); k++)

0 commit comments

Comments
 (0)