| 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 | { |
nothing calls this directly
no test coverage detected