MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / DrawLines3D

Method DrawLines3D

TombEngine/Renderer/RendererDraw.cpp:1146–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1144 }
1145
1146 void Renderer::DrawLines3D(RenderView& view)
1147 {
1148 SetBlendMode(BlendMode::Additive);
1149 SetCullMode(CullMode::None);
1150
1151 _shaders.Bind(Shader::Solid);
1152
1153 _context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
1154
1155 _primitiveBatch->Begin();
1156
1157 for (const auto& line : _lines3DToDraw)
1158 {
1159 auto vertex0 = Vertex{};
1160 vertex0.Position = line.Origin;
1161 vertex0.Color = VectorColorToRGBA_TempToVector4(line.Color);
1162
1163 auto vertex1 = Vertex{};
1164 vertex1.Position = line.Target;
1165 vertex1.Color = VectorColorToRGBA_TempToVector4(line.Color);
1166
1167 _primitiveBatch->DrawLine(vertex0, vertex1);
1168
1169 _numLinesDrawCalls++;
1170 _numDrawCalls++;
1171 }
1172
1173 _primitiveBatch->End();
1174
1175 SetBlendMode(BlendMode::Opaque);
1176 SetCullMode(CullMode::CounterClockwise);
1177 }
1178
1179 void Renderer::DrawTriangles3D(RenderView& view)
1180 {

Callers

nothing calls this directly

Calls 2

BindMethod · 0.80

Tested by

no test coverage detected