MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / DrawTriangle

Method DrawTriangle

Code/CryEngine/CryAction/UIDraw/UIDraw.cpp:164–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162//-----------------------------------------------------------------------------------------------------
163
164void CUIDraw::DrawTriangle(float fX0, float fY0, float fX1, float fY1, float fX2, float fY2, uint32 uiColor)
165{
166 SVF_P3F_C4B_T2F aVertices[3];
167
168 const float fOff = -0.5f;
169
170 aVertices[0].color.dcolor = uiColor;
171 aVertices[0].xyz = Vec3(fX0 + fOff, fY0 + fOff, 0.0f);
172 aVertices[0].st = Vec2(0, 0);
173
174 aVertices[1].color.dcolor = uiColor;
175 aVertices[1].xyz = Vec3(fX1 + fOff, fY1 + fOff, 0.0f);
176 aVertices[1].st = Vec2(0, 0);
177
178 aVertices[2].color.dcolor = uiColor;
179 aVertices[2].xyz = Vec3(fX2 + fOff, fY2 + fOff, 0.0f);
180 aVertices[2].st = Vec2(0, 0);
181
182 uint16 ausIndices[] = { 0, 1, 2 };
183
184 m_pRenderer->SetWhiteTexture();
185 m_pRenderer->DrawDynVB(aVertices, ausIndices, 3, CRY_ARRAY_COUNT(ausIndices), prtTriangleList);
186}
187
188//-----------------------------------------------------------------------------------------------------
189

Callers 15

DebugDrawAreaMethod · 0.45
DebugDrawRadarMethod · 0.45
DebugDrawSteepSlopesMethod · 0.45
DebugDrawMethod · 0.45
DebugDrawMethod · 0.45
DebugDrawRayCastMethod · 0.45
DebugDrawPathFinderMethod · 0.45
DrawSpanGridTopFunction · 0.45
DrawMethod · 0.45

Calls 2

SetWhiteTextureMethod · 0.80
DrawDynVBMethod · 0.80

Tested by

no test coverage detected