MCPcopy Create free account
hub / github.com/ddnet/ddnet / LinesDraw

Method LinesDraw

src/engine/client/graphics_threaded.cpp:240–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void CGraphics_Threaded::LinesDraw(const CLineItem *pArray, size_t Num)
241{
242 dbg_assert(m_Drawing == EDrawing::LINES, "called Graphics()->LinesDraw without begin");
243
244 size_t VertexIndex = m_NumVertices;
245 for(size_t i = 0; i < Num; ++i)
246 {
247 m_aVertices[VertexIndex].m_Pos.x = pArray[i].m_X0;
248 m_aVertices[VertexIndex].m_Pos.y = pArray[i].m_Y0;
249 m_aVertices[VertexIndex].m_Tex = m_aTexture[0];
250 SetColor(&m_aVertices[VertexIndex], 0);
251 ++VertexIndex;
252
253 m_aVertices[VertexIndex].m_Pos.x = pArray[i].m_X1;
254 m_aVertices[VertexIndex].m_Pos.y = pArray[i].m_Y1;
255 m_aVertices[VertexIndex].m_Tex = m_aTexture[1];
256 SetColor(&m_aVertices[VertexIndex], 1);
257 ++VertexIndex;
258 }
259
260 AddVertices(2 * Num);
261}
262
263void CGraphics_Threaded::LinesBatchBegin(CLineItemBatch *pBatch)
264{

Callers 10

DrawOutlineMethod · 0.80
RenderHookCollLineMethod · 0.80
DoQuadKnifeMethod · 0.80
RenderImagesListMethod · 0.80
RenderSoundsMethod · 0.80
RenderEnvelopeEditorMethod · 0.80
RenderScreenSizesMethod · 0.80
RenderDebugClipMethod · 0.80
RenderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected