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

Method Init

src/game/client/render.cpp:93–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void CRenderTools::Init(IGraphics *pGraphics, ITextRender *pTextRender)
94{
95 m_pGraphics = pGraphics;
96 m_pTextRender = pTextRender;
97 m_TeeQuadContainerIndex = Graphics()->CreateQuadContainer(false);
98 Graphics()->SetColor(1.f, 1.f, 1.f, 1.f);
99
100 Graphics()->QuadsSetSubset(0, 0, 1, 1);
101 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f);
102 Graphics()->QuadsSetSubset(0, 0, 1, 1);
103 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f);
104
105 Graphics()->QuadsSetSubset(0, 0, 1, 1);
106 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f * 0.4f);
107 Graphics()->QuadsSetSubset(0, 0, 1, 1);
108 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f * 0.4f);
109 Graphics()->QuadsSetSubset(0, 0, 1, 1);
110 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f * 0.4f);
111 Graphics()->QuadsSetSubset(0, 0, 1, 1);
112 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f * 0.4f);
113 Graphics()->QuadsSetSubset(0, 0, 1, 1);
114 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, 64.f * 0.4f);
115
116 // Feet
117 Graphics()->QuadsSetSubset(0, 0, 1, 1);
118 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, -32.f, -16.f, 64.f, 32.f);
119 Graphics()->QuadsSetSubset(0, 0, 1, 1);
120 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, -32.f, -16.f, 64.f, 32.f);
121
122 // Mirrored Feet
123 Graphics()->QuadsSetSubsetFree(1, 0, 0, 0, 0, 1, 1, 1);
124 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, -32.f, -16.f, 64.f, 32.f);
125 Graphics()->QuadsSetSubsetFree(1, 0, 0, 0, 0, 1, 1, 1);
126 Graphics()->QuadContainerAddSprite(m_TeeQuadContainerIndex, -32.f, -16.f, 64.f, 32.f);
127
128 Graphics()->QuadContainerUpload(m_TeeQuadContainerIndex);
129}
130
131void CRenderTools::RenderCursor(vec2 Center, float Size) const
132{

Callers

nothing calls this directly

Calls 7

GraphicsFunction · 0.85
CreateQuadContainerMethod · 0.80
QuadsSetSubsetMethod · 0.80
QuadsSetSubsetFreeMethod · 0.80
QuadContainerUploadMethod · 0.80
SetColorMethod · 0.45

Tested by

no test coverage detected